'use strict'; module.exports = app => { const DataTypes = app.Sequelize; const sequelize = app.model; const attributes = { accessId: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: true, autoIncrement: true, comment: "节点ID", field: "access_id" }, accessName: { type: DataTypes.STRING(20), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "节点名称", field: "access_name" }, pid: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "上级ID", field: "pid" }, routerPath: { type: DataTypes.STRING(255), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "跳转地址", field: "router_path" }, routerName: { type: DataTypes.STRING(100), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "节点路由 对应vue路由", field: "router_name" }, accessIcon: { type: DataTypes.STRING(30), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "节点图标", field: "access_icon" }, accessSort: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "节点排序", field: "access_sort" }, level: { type: DataTypes.INTEGER(1).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "节点等级", field: "level" }, isNav: { type: DataTypes.INTEGER(1).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "是否导航节点", field: "is_nav" }, adminId: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "操作管理员", field: "admin_id" }, accessStatus: { type: DataTypes.INTEGER(1).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "节点状态", field: "access_status" }, vuecomponent: { type: DataTypes.STRING(255), allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "加载页面", field: "vuecomponent" }, mobileShow: { type: DataTypes.INTEGER(1).UNSIGNED, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: "移动端是否显示", field: "mobile_show" }, 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_accesss", comment: "", indexes: [{ name: "is_nav", unique: false, type: "BTREE", fields: ["is_nav", "access_status"] }, { name: "mobile_show", unique: false, type: "BTREE", fields: ["mobile_show"] }] }; const SzjAccesssModel = sequelize.define("szjAccesssModel", attributes, options); return SzjAccesssModel; };