📜  modele sequelize - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:18.746000             🧑  作者: Mango

代码示例1
module.exports = function (sequelize, DataTypes) { return sequelize.define('Locale', { id: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true }, locale: { type: DataTypes.STRING, allowNull: false, unique: true, validate: { len: 2 } }, visible: { type: DataTypes.BOOLEAN, defaultValue: 1 } }) }