Is it possible to get the data type of this field from the sequelize model. Suppose we have a module defined as follows:
User = sequelize.define 'User',
{
id:
type: DataTypes.UUID
primaryKey: true
defaultValue: DataTypes.UUIDV4
firstName:
type: DataTypes.STRING
allowNull: false
middleName:
type: DataTypes.STRING
allowNull: true
defaultValue: null
lastName:
type: DataTypes.STRING
allowNull: true
defaultValue: null
}
I need to specify the data type for firstName. Is there any method in the model that can achieve this?
source
share