update: sql init

This commit is contained in:
Damonny 2024-12-31 00:10:36 +08:00
parent db30ad48c7
commit ec3deb209e
1 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,46 @@
-- 菜单 SQL
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status, component_name
)
VALUES (
'生产管理', '', 1, 3, 0,
'/orders', '', '', 0, ''
);
-- 按钮父菜单ID
-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
SELECT @parentId := LAST_INSERT_ID();
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status, component_name
)
VALUES (
'订单审核', '', 2, 0, @parentId,
'orders', '', 'haoka/orderAudit/index', 0, 'orderAudit'
);
-- 按钮 SQL
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'订单查询', 'haoka:orderAudit:query', 3, 1, @parentId,
'', '', '', 0
);
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'订单更新', 'haoka:orderAudit:update', 3, 2, @parentId,
'', '', '', 0
);
INSERT INTO system_menu(
name, permission, type, sort, parent_id,
path, icon, component, status
)
VALUES (
'订单导出', 'haoka:orderAudit:export', 3, 3, @parentId,
'', '', '', 0
);