This is a Branded Type. You can use it to tag attributes that can be omitted during Model Creation. Use it on attributes that have a default value or are marked as autoIncrement.
For use with InferCreationAttributes.
class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> { @Attribute(DataTypes.INTEGER) @PrimaryKey @AutoIncrement declare internalId: CreationOptional<number>; @Attribute(DataTypes.STRING) @Default('John Doe') declare name: CreationOptional<string>;} Copy
class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> { @Attribute(DataTypes.INTEGER) @PrimaryKey @AutoIncrement declare internalId: CreationOptional<number>; @Attribute(DataTypes.STRING) @Default('John Doe') declare name: CreationOptional<string>;}
This is a Branded Type. You can use it to tag attributes that can be omitted during Model Creation. Use it on attributes that have a default value or are marked as autoIncrement.
For use with InferCreationAttributes.