12
This commit is contained in:
@@ -2,7 +2,7 @@ const Sequelize = require("sequelize");
|
||||
|
||||
/** 租户表:用户、角色按 tenant_id 隔离;is_platform=1 的租户可管理本表 */
|
||||
module.exports = (db) => {
|
||||
return db.define("sys_tenant", {
|
||||
const sys_tenant= db.define("sys_tenant", {
|
||||
name: {
|
||||
type: Sequelize.STRING(100),
|
||||
allowNull: false,
|
||||
@@ -37,4 +37,6 @@ module.exports = (db) => {
|
||||
comment: "是否平台租户",
|
||||
},
|
||||
});
|
||||
|
||||
return sys_tenant
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ const Sequelize = require("sequelize");
|
||||
|
||||
/** 模板示例:与库表字段 create_time / last_modify_time / is_delete 一致(无 createdAt/updatedAt) */
|
||||
module.exports = (db) => {
|
||||
return db.define(
|
||||
const tpl_demo = db.define(
|
||||
"tpl_demo",
|
||||
{
|
||||
title: {
|
||||
@@ -57,4 +57,8 @@ module.exports = (db) => {
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
// tpl_demo.sync({})
|
||||
return tpl_demo
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user