'use strict'; module.exports = app => { const DataTypes = app.Sequelize; const sequelize = app.model; const attributes = { roleId: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: true, autoIncrement: true, comment: "角色ID", field: "role_id" }, roleDesc: { type: DataTypes.STRING(255), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "角色描述", field: "role_desc" }, roleName: { type: DataTypes.STRING(20), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "角色名称", field: "role_name" }, adminId: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "操作管理员", field: "admin_id" }, updateTime: { type: DataTypes.DATE, allowNull: false, defaultValue: sequelize.literal('CURRENT_TIMESTAMP'), primaryKey: false, autoIncrement: false, comment: "更新时间", field: "update_time" }, createTime: { type: DataTypes.DATE, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "创建时间", field: "create_time" } }; const options = { tableName: "szj_roles", comment: "", indexes: [] }; const SzjRolesModel = sequelize.define("szjRolesModel", attributes, options); return SzjRolesModel; };