Configuration settings for a Sequelize model. Defines the attributes, model class, and options for a single model.
const userModelSettings: ModelSettings = { attributes: { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true }, name: { type: DataTypes.STRING, allowNull: false }, email: { type: DataTypes.STRING, unique: true } }, options: { modelName: 'User', tableName: 'users' }}; Copy
const userModelSettings: ModelSettings = { attributes: { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true }, name: { type: DataTypes.STRING, allowNull: false }, email: { type: DataTypes.STRING, unique: true } }, options: { modelName: 'User', tableName: 'users' }};
The model attributes type, defaults to any JSON object
The creation attributes type, defaults to TModelAttributes
The model attribute definitions
Optional
Optional pre-defined model class that extends Sequelize Model
Model configuration options such as tableName, timestamps, etc.
Configuration settings for a Sequelize model. Defines the attributes, model class, and options for a single model.
Example