-- 项目管理菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
VALUES ('项目管理', 0, 6, 'project', NULL, 1, 0, 'M', '0', '0', NULL, 'example', 'admin', now(), '项目管理目录');

-- 项目简介菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目简介', menu_id, 1, 'intro', 'project/intro/index', 1, 0, 'C', '0', '0', 'project:intro:list', 'documentation', 'admin', now(), '项目简介菜单' 
FROM sys_menu WHERE menu_name = '项目管理' ORDER BY menu_id DESC LIMIT 1;

-- 项目简介编辑权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目简介编辑', menu_id, 1, '#', '', 1, 0, 'F', '0', '0', 'project:intro:edit', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目简介' ORDER BY menu_id DESC LIMIT 1;

-- 项目列表菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目列表', menu_id, 2, 'list', 'project/list/index', 1, 0, 'C', '0', '0', 'project:info:list', 'list', 'admin', now(), '项目列表菜单' 
FROM sys_menu WHERE menu_name = '项目管理' ORDER BY menu_id DESC LIMIT 1;

-- 项目列表查询权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目查询', menu_id, 1, '#', '', 1, 0, 'F', '0', '0', 'project:info:query', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目列表' ORDER BY menu_id DESC LIMIT 1;

-- 项目列表新增权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目新增', menu_id, 2, '#', '', 1, 0, 'F', '0', '0', 'project:info:add', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目列表' ORDER BY menu_id DESC LIMIT 1;

-- 项目列表修改权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目修改', menu_id, 3, '#', '', 1, 0, 'F', '0', '0', 'project:info:edit', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目列表' ORDER BY menu_id DESC LIMIT 1;

-- 项目列表删除权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目删除', menu_id, 4, '#', '', 1, 0, 'F', '0', '0', 'project:info:remove', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目列表' ORDER BY menu_id DESC LIMIT 1;

-- 项目列表导出权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目导出', menu_id, 5, '#', '', 1, 0, 'F', '0', '0', 'project:info:export', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目列表' ORDER BY menu_id DESC LIMIT 1;

-- 项目进展更新菜单
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '项目进展更新', menu_id, 3, 'progress', 'project/progress/index', 1, 0, 'C', '0', '0', 'project:progress:list', 'time', 'admin', now(), '项目进展更新菜单' 
FROM sys_menu WHERE menu_name = '项目管理' ORDER BY menu_id DESC LIMIT 1;

-- 项目进展查询权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '进展查询', menu_id, 1, '#', '', 1, 0, 'F', '0', '0', 'project:progress:query', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目进展更新' ORDER BY menu_id DESC LIMIT 1;

-- 项目进展新增权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '进展新增', menu_id, 2, '#', '', 1, 0, 'F', '0', '0', 'project:progress:add', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目进展更新' ORDER BY menu_id DESC LIMIT 1;

-- 项目进展修改权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '进展修改', menu_id, 3, '#', '', 1, 0, 'F', '0', '0', 'project:progress:edit', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目进展更新' ORDER BY menu_id DESC LIMIT 1;

-- 项目进展删除权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '进展删除', menu_id, 4, '#', '', 1, 0, 'F', '0', '0', 'project:progress:remove', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目进展更新' ORDER BY menu_id DESC LIMIT 1;

-- 项目进展导出权限
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark) 
SELECT '进展导出', menu_id, 5, '#', '', 1, 0, 'F', '0', '0', 'project:progress:export', '#', 'admin', now(), '' 
FROM sys_menu WHERE menu_name = '项目进展更新' ORDER BY menu_id DESC LIMIT 1;
