-- 菜单 SQL
-- 进展情况管理菜单
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, update_by, update_time, remark)
VALUES ('进展情况管理', 0, 5, 'progress', NULL, 1, 0, 'M', '0', '0', NULL, 'guide', 'admin', sysdate(), '', NULL, '进展情况管理目录');

-- 获取刚插入的进展情况管理菜单ID（假设为2000，实际使用时需要根据实际情况调整）
-- 实时动态管理菜单
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, update_by, update_time, remark)
VALUES ('实时动态管理', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '进展情况管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 1, 'realtimeNews', 'progress/realtimeNews/index', 1, 0, 'C', '0', '0', 'progress:realtimeNews:list', 'list', 'admin', sysdate(), '', NULL, '实时动态管理菜单');

-- 实时动态管理按钮
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, update_by, update_time, remark)
VALUES ('实时动态查询', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '实时动态管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 1, '#', '', 1, 0, 'F', '0', '0', 'progress:realtimeNews:query', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('实时动态新增', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '实时动态管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 2, '#', '', 1, 0, 'F', '0', '0', 'progress:realtimeNews:add', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('实时动态修改', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '实时动态管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 3, '#', '', 1, 0, 'F', '0', '0', 'progress:realtimeNews:edit', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('实时动态删除', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '实时动态管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 4, '#', '', 1, 0, 'F', '0', '0', 'progress:realtimeNews:remove', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('实时动态导出', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '实时动态管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 5, '#', '', 1, 0, 'F', '0', '0', 'progress:realtimeNews:export', '#', 'admin', sysdate(), '', NULL, '');

-- 里程碑事件管理菜单
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, update_by, update_time, remark)
VALUES ('里程碑事件管理', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '进展情况管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 2, 'milestone', 'progress/milestone/index', 1, 0, 'C', '0', '0', 'progress:milestone:list', 'time', 'admin', sysdate(), '', NULL, '里程碑事件管理菜单');

-- 里程碑事件管理按钮
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, update_by, update_time, remark)
VALUES ('里程碑事件查询', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '里程碑事件管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 1, '#', '', 1, 0, 'F', '0', '0', 'progress:milestone:query', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('里程碑事件新增', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '里程碑事件管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 2, '#', '', 1, 0, 'F', '0', '0', 'progress:milestone:add', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('里程碑事件修改', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '里程碑事件管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 3, '#', '', 1, 0, 'F', '0', '0', 'progress:milestone:edit', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('里程碑事件删除', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '里程碑事件管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 4, '#', '', 1, 0, 'F', '0', '0', 'progress:milestone:remove', '#', 'admin', sysdate(), '', NULL, '');

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, update_by, update_time, remark)
VALUES ('里程碑事件导出', (SELECT menu_id FROM (SELECT menu_id FROM sys_menu WHERE menu_name = '里程碑事件管理' ORDER BY menu_id DESC LIMIT 1) AS tmp), 5, '#', '', 1, 0, 'F', '0', '0', 'progress:milestone:export', '#', 'admin', sysdate(), '', NULL, '');
