Skip to content

Commit 1bb4e71

Browse files
authored
docs(readme): show options for @unique() Column Decorator (#677)
1 parent 8fc12fb commit 1bb4e71

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,15 @@ Decorator | Description
267267
If you're in love with decorators: *sequelize-typescript* provides some more of them. The following decorators can be
268268
used together with the @Column annotation to make some attribute options easier available:
269269

270-
Decorator | Description
271-
--------------------------------------|---------------------
272-
`@AllowNull(allowNull?: boolean)` | sets `attribute.allowNull` (default is `true`)
273-
`@AutoIncrement` | sets `attribute.autoIncrement=true`
274-
`@Unique` | sets `attribute.unique=true`
275-
`@Default(value: any)` | sets `attribute.defaultValue` to specified value
276-
`@PrimaryKey` | sets `attribute.primaryKey=true`
277-
`@Comment(value: string)` | sets `attribute.comment` to specified string
278-
Validate annotations | see [Model validation](#model-validation)
270+
Decorator | Description | Options
271+
--------------------------------------|-----------------------------------------------------|---------------------
272+
`@AllowNull(allowNull?: boolean)` | sets `attribute.allowNull` (default is `true`) |
273+
`@AutoIncrement` | sets `attribute.autoIncrement=true` |
274+
`@Unique(options? UniqueOptions)` | sets `attribute.unique=true` | [UniqueOptions](https://github.com/RobinBuschmann/sequelize-typescript/blob/master/src/model/column/column-options/unique.ts#L3)
275+
`@Default(value: any)` | sets `attribute.defaultValue` to specified value |
276+
`@PrimaryKey` | sets `attribute.primaryKey=true` |
277+
`@Comment(value: string)` | sets `attribute.comment` to specified string |
278+
Validate annotations | see [Model validation](#model-validation) |
279279

280280
### Type inference
281281
The following types can be automatically inferred from javascript type. Others have to be defined explicitly.

0 commit comments

Comments
 (0)