feat: add sys_user_menu_favorite table for portal menu favorites
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2ccc3b612a
commit
1a0c58f82d
2 files changed
+38
No files matched your search
@@ -273,6 +273,24 @@ class SysUserPost(Base):
|
||||
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
|
||||
|
||||
|
||||
class SysUserMenuFavorite(Base):
|
||||
"""用户菜单收藏 sys_user_menu_favorite"""
|
||||
|
||||
__tablename__ = "sys_user_menu_favorite"
|
||||
|
||||
id = Column(String(64), primary_key=True, comment="主键ID")
|
||||
user_id = Column(String(64), nullable=False, comment="用户ID")
|
||||
menu_path = Column(String(512), nullable=False, comment="菜单路由 path")
|
||||
tenant_no = Column(String(64), nullable=False, default="shanxia2.0", comment="租户编号")
|
||||
order_num = Column(Integer, nullable=True, comment="排序号")
|
||||
remark = Column(String(512), nullable=True, comment="备注")
|
||||
create_by = Column(String(64), nullable=True, comment="创建人id")
|
||||
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
|
||||
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
|
||||
update_by = Column(String(64), nullable=True, comment="更新人id")
|
||||
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# 字典管理(sys_dict_type / sys_dict_data)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
-- 用户菜单收藏(门户首页启动器)
|
||||
-- 幂等:表已存在则跳过
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sys_user_menu_favorite` (
|
||||
`id` varchar(64) NOT NULL COMMENT '主键ID',
|
||||
`user_id` varchar(64) NOT NULL COMMENT '用户ID',
|
||||
`menu_path` varchar(512) NOT NULL COMMENT '菜单路由 path',
|
||||
`tenant_no` varchar(64) NOT NULL DEFAULT 'shanxia2.0' COMMENT '租户编号',
|
||||
`order_num` int(11) DEFAULT NULL COMMENT '排序号(越小越靠前)',
|
||||
`remark` varchar(512) DEFAULT NULL COMMENT '备注',
|
||||
`create_by` varchar(64) DEFAULT NULL COMMENT '创建人id',
|
||||
`create_dept_id` varchar(64) NOT NULL DEFAULT '' COMMENT '创建人部门ID',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_by` varchar(64) DEFAULT NULL COMMENT '更新人id',
|
||||
`update_time` datetime NOT NULL COMMENT '更新时间',
|
||||
`del_flag` smallint(6) NOT NULL DEFAULT '0' COMMENT '删除标记 0正常 1已删除',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_fav_user_tenant` (`user_id`, `tenant_no`, `del_flag`),
|
||||
KEY `idx_fav_path` (`menu_path`(191))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户菜单收藏';
|
||||
Reference in new issue
Block a user