File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -267,15 +267,15 @@ Decorator | Description
267267If you're in love with decorators: * sequelize-typescript* provides some more of them. The following decorators can be
268268used 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
281281The following types can be automatically inferred from javascript type. Others have to be defined explicitly.
You can’t perform that action at this time.
0 commit comments