Update menu field show to display (#498)

This commit is contained in:
Wu Clan
2025-01-23 22:46:05 +08:00
committed by GitHub
parent e588913d54
commit ebe710fac2
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ class Menu(Base):
component: Mapped[str | None] = mapped_column(String(255), default=None, comment='组件路径') component: Mapped[str | None] = mapped_column(String(255), default=None, comment='组件路径')
perms: Mapped[str | None] = mapped_column(String(100), default=None, comment='权限标识') perms: Mapped[str | None] = mapped_column(String(100), default=None, comment='权限标识')
status: Mapped[int] = mapped_column(default=1, comment='菜单状态(0停用 1正常)') status: Mapped[int] = mapped_column(default=1, comment='菜单状态(0停用 1正常)')
show: Mapped[int] = mapped_column(default=1, comment='是否显示(0否 1是)') display: Mapped[int] = mapped_column(default=1, comment='是否显示(0否 1是)')
cache: Mapped[int] = mapped_column(default=1, comment='是否缓存(0否 1是)') cache: Mapped[int] = mapped_column(default=1, comment='是否缓存(0否 1是)')
remark: Mapped[str | None] = mapped_column( remark: Mapped[str | None] = mapped_column(
LONGTEXT().with_variant(TEXT, 'postgresql'), default=None, comment='备注' LONGTEXT().with_variant(TEXT, 'postgresql'), default=None, comment='备注'
+1 -1
View File
@@ -19,7 +19,7 @@ class MenuSchemaBase(SchemaBase):
component: str | None = None component: str | None = None
perms: str | None = None perms: str | None = None
status: StatusType = Field(default=StatusType.enable) status: StatusType = Field(default=StatusType.enable)
show: StatusType = Field(default=StatusType.enable) display: StatusType = Field(default=StatusType.enable)
cache: StatusType = Field(default=StatusType.enable) cache: StatusType = Field(default=StatusType.enable)
remark: str | None = None remark: str | None = None
+1 -1
View File
@@ -226,7 +226,7 @@ create table sys_menu
component varchar(255) null comment '组件路径', component varchar(255) null comment '组件路径',
perms varchar(100) null comment '权限标识', perms varchar(100) null comment '权限标识',
status int not null comment '菜单状态(0停用 1正常)', status int not null comment '菜单状态(0停用 1正常)',
`show` int not null comment '是否显示(0否 1是)', display int not null comment '是否显示(0否 1是)',
cache int not null comment '是否缓存(0否 1是)', cache int not null comment '是否缓存(0否 1是)',
remark longtext null comment '备注', remark longtext null comment '备注',
parent_id int null comment '父菜单ID', parent_id int null comment '父菜单ID',
+1 -1
View File
@@ -6,7 +6,7 @@ values (1, '创建API', 'POST', '/api/v1/apis', null, '2024-02-02 11:29:47', nu
(2, '删除API', 'DELETE', '/api/v1/apis', null, '2024-02-02 11:31:32', null), (2, '删除API', 'DELETE', '/api/v1/apis', null, '2024-02-02 11:31:32', null),
(3, '编辑API', 'PUT', '/api/v1/apis/{pk}', null, '2024-02-02 11:32:22', null); (3, '编辑API', 'PUT', '/api/v1/apis/{pk}', null, '2024-02-02 11:32:22', null);
insert into sys_menu (id, title, name, level, sort, icon, path, menu_type, component, perms, status, show, cache, remark, parent_id, created_time, updated_time) insert into sys_menu (id, title, name, level, sort, icon, path, menu_type, component, perms, status, display, cache, remark, parent_id, created_time, updated_time)
values (1, '测试', 'test', 0, 0, '', null, 0, null, null, 0, 0, 1, null, null, '2023-07-27 19:14:10', null), values (1, '测试', 'test', 0, 0, '', null, 0, null, null, 0, 0, 1, null, null, '2023-07-27 19:14:10', null),
(2, '仪表盘', 'dashboard', 0, 0, 'IconDashboard', 'dashboard', 0, null, null, 1, 1, 1, null, null, '2023-07-27 19:15:45', null), (2, '仪表盘', 'dashboard', 0, 0, 'IconDashboard', 'dashboard', 0, null, null, 1, 1, 1, null, null, '2023-07-27 19:15:45', null),
(3, '工作台', 'Workplace', 0, 0, null, 'workplace', 1, '/dashboard/workplace/index.vue', null, 1, 1, 1, null, 2, '2023-07-27 19:17:59', null), (3, '工作台', 'Workplace', 0, 0, null, 'workplace', 1, '/dashboard/workplace/index.vue', null, 1, 1, 1, null, 2, '2023-07-27 19:17:59', null),
+2 -2
View File
@@ -273,7 +273,7 @@ create table sys_menu
component varchar(255), component varchar(255),
perms varchar(100), perms varchar(100),
status integer not null, status integer not null,
show integer not null, display integer not null,
cache integer not null, cache integer not null,
remark text, remark text,
parent_id integer parent_id integer
@@ -305,7 +305,7 @@ comment on column sys_menu.perms is '权限标识';
comment on column sys_menu.status is '菜单状态(0停用 1正常)'; comment on column sys_menu.status is '菜单状态(0停用 1正常)';
comment on column sys_menu.show is '是否显示(0否 1是)'; comment on column sys_menu.display is '是否显示(0否 1是)';
comment on column sys_menu.cache is '是否缓存(0否 1是)'; comment on column sys_menu.cache is '是否缓存(0否 1是)';
+1 -1
View File
@@ -6,7 +6,7 @@ values (1, '创建API', 'POST', '/api/v1/apis', null, '2024-02-02 11:29:47', nu
(2, '删除API', 'DELETE', '/api/v1/apis', null, '2024-02-02 11:31:32', null), (2, '删除API', 'DELETE', '/api/v1/apis', null, '2024-02-02 11:31:32', null),
(3, '编辑API', 'PUT', '/api/v1/apis/{pk}', null, '2024-02-02 11:32:22', null); (3, '编辑API', 'PUT', '/api/v1/apis/{pk}', null, '2024-02-02 11:32:22', null);
insert into sys_menu (id, title, name, level, sort, icon, path, menu_type, component, perms, status, show, cache, remark, parent_id, created_time, updated_time) insert into sys_menu (id, title, name, level, sort, icon, path, menu_type, component, perms, status, display, cache, remark, parent_id, created_time, updated_time)
values (1, '测试', 'test', 0, 0, '', null, 0, null, null, 0, 0, 1, null, null, '2023-07-27 19:14:10', null), values (1, '测试', 'test', 0, 0, '', null, 0, null, null, 0, 0, 1, null, null, '2023-07-27 19:14:10', null),
(2, '仪表盘', 'dashboard', 0, 0, 'IconDashboard', 'dashboard', 0, null, null, 1, 1, 1, null, null, '2023-07-27 19:15:45', null), (2, '仪表盘', 'dashboard', 0, 0, 'IconDashboard', 'dashboard', 0, null, null, 1, 1, 1, null, null, '2023-07-27 19:15:45', null),
(3, '工作台', 'Workplace', 0, 0, null, 'workplace', 1, '/dashboard/workplace/index.vue', null, 1, 1, 1, null, 2, '2023-07-27 19:17:59', null), (3, '工作台', 'Workplace', 0, 0, null, 'workplace', 1, '/dashboard/workplace/index.vue', null, 1, 1, 1, null, 2, '2023-07-27 19:17:59', null),