Skip to content

Commit ebe710f

Browse files
authored
Update menu field show to display (#498)
1 parent e588913 commit ebe710f

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

backend/app/admin/model/menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Menu(Base):
2727
component: Mapped[str | None] = mapped_column(String(255), default=None, comment='组件路径')
2828
perms: Mapped[str | None] = mapped_column(String(100), default=None, comment='权限标识')
2929
status: Mapped[int] = mapped_column(default=1, comment='菜单状态(0停用 1正常)')
30-
show: Mapped[int] = mapped_column(default=1, comment='是否显示(0否 1是)')
30+
display: Mapped[int] = mapped_column(default=1, comment='是否显示(0否 1是)')
3131
cache: Mapped[int] = mapped_column(default=1, comment='是否缓存(0否 1是)')
3232
remark: Mapped[str | None] = mapped_column(
3333
LONGTEXT().with_variant(TEXT, 'postgresql'), default=None, comment='备注'

backend/app/admin/schema/menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class MenuSchemaBase(SchemaBase):
1919
component: str | None = None
2020
perms: str | None = None
2121
status: StatusType = Field(default=StatusType.enable)
22-
show: StatusType = Field(default=StatusType.enable)
22+
display: StatusType = Field(default=StatusType.enable)
2323
cache: StatusType = Field(default=StatusType.enable)
2424
remark: str | None = None
2525

backend/sql/mysql/create_tables.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ create table sys_menu
226226
component varchar(255) null comment '组件路径',
227227
perms varchar(100) null comment '权限标识',
228228
status int not null comment '菜单状态(0停用 1正常)',
229-
`show` int not null comment '是否显示(0否 1是)',
229+
display int not null comment '是否显示(0否 1是)',
230230
cache int not null comment '是否缓存(0否 1是)',
231231
remark longtext null comment '备注',
232232
parent_id int null comment '父菜单ID',

backend/sql/mysql/init_test_data.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ values (1, '创建API', 'POST', '/api/v1/apis', null, '2024-02-02 11:29:47', nu
66
(2, '删除API', 'DELETE', '/api/v1/apis', null, '2024-02-02 11:31:32', null),
77
(3, '编辑API', 'PUT', '/api/v1/apis/{pk}', null, '2024-02-02 11:32:22', null);
88

9-
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)
9+
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)
1010
values (1, '测试', 'test', 0, 0, '', null, 0, null, null, 0, 0, 1, null, null, '2023-07-27 19:14:10', null),
1111
(2, '仪表盘', 'dashboard', 0, 0, 'IconDashboard', 'dashboard', 0, null, null, 1, 1, 1, null, null, '2023-07-27 19:15:45', null),
1212
(3, '工作台', 'Workplace', 0, 0, null, 'workplace', 1, '/dashboard/workplace/index.vue', null, 1, 1, 1, null, 2, '2023-07-27 19:17:59', null),

backend/sql/postgresql/create_tables.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ create table sys_menu
273273
component varchar(255),
274274
perms varchar(100),
275275
status integer not null,
276-
show integer not null,
276+
display integer not null,
277277
cache integer not null,
278278
remark text,
279279
parent_id integer
@@ -305,7 +305,7 @@ comment on column sys_menu.perms is '权限标识';
305305

306306
comment on column sys_menu.status is '菜单状态(0停用 1正常)';
307307

308-
comment on column sys_menu.show is '是否显示(0否 1是)';
308+
comment on column sys_menu.display is '是否显示(0否 1是)';
309309

310310
comment on column sys_menu.cache is '是否缓存(0否 1是)';
311311

backend/sql/postgresql/init_test_data.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ values (1, '创建API', 'POST', '/api/v1/apis', null, '2024-02-02 11:29:47', nu
66
(2, '删除API', 'DELETE', '/api/v1/apis', null, '2024-02-02 11:31:32', null),
77
(3, '编辑API', 'PUT', '/api/v1/apis/{pk}', null, '2024-02-02 11:32:22', null);
88

9-
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)
9+
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)
1010
values (1, '测试', 'test', 0, 0, '', null, 0, null, null, 0, 0, 1, null, null, '2023-07-27 19:14:10', null),
1111
(2, '仪表盘', 'dashboard', 0, 0, 'IconDashboard', 'dashboard', 0, null, null, 1, 1, 1, null, null, '2023-07-27 19:15:45', null),
1212
(3, '工作台', 'Workplace', 0, 0, null, 'workplace', 1, '/dashboard/workplace/index.vue', null, 1, 1, 1, null, 2, '2023-07-27 19:17:59', null),

0 commit comments

Comments
 (0)