This commit is contained in:
张成
2026-04-29 14:31:53 +08:00
parent 1850ec93a2
commit cfb92ce33d
5 changed files with 272 additions and 41 deletions

View File

@@ -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
};

View File

@@ -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
};