Decorator that maps the given property to a database column of the specified FieldType.
class MyModel extends Model<MyModel> { // Maps the 'name' VARCHAR column in the database to this property @Field(FieldType.Varchar) public name!: string // Maps the 'first_name' VARCHAR column in the database to this property @Field(FieldType.Varchar, 'first_name') public firstName!: string}
Optional
Decorator that maps the given property to a database column of the specified FieldType.
Example