-- 流域管理模块菜单配置
-- 1. 添加流域管理主菜单
INSERT INTO "SYS_MENU" VALUES (2000, '流域管理', 0, 1, 'watershed', NULL, '', 1, 0, 'M', '0', '0', '', 'water', 'admin', '2023-12-29 10:00:00', '', NULL, '流域管理目录');

-- 2. 添加流域平台子菜单
INSERT INTO "SYS_MENU" VALUES (2001, '流域平台', 2000, 1, 'hydrological', 'watershed/hydrological/index', '', 1, 0, 'C', '0', '0', 'watershed:hydrological:list', 'monitor', 'admin', '2023-12-29 10:00:00', '', NULL, '流域管理平台菜单');

-- 3. 添加机电设备管理子菜单
INSERT INTO "SYS_MENU" VALUES (2002, '机电设备', 2000, 2, 'equipment', 'watershed/equipment/index', '', 1, 0, 'C', '0', '0', 'watershed:equipment:list', 'list', 'admin', '2023-12-29 10:00:00', '', NULL, '机电设备管理菜单');

-- 4. 添加流域模型子菜单
INSERT INTO "SYS_MENU" VALUES (2003, '流域模型', 2000, 3, 'model', 'watershed/model/index', '', 1, 0, 'C', '0', '0', 'watershed:model:list', 'build', 'admin', '2023-12-29 10:00:00', '', NULL, '流域模型管理菜单');

-- 5. 添加水利设施子菜单
INSERT INTO "SYS_MENU" VALUES (2004, '水利设施', 2000, 4, 'facility', 'watershed/facility/index', '', 1, 0, 'C', '0', '0', 'watershed:facility:list', 'tree', 'admin', '2023-12-29 10:00:00', '', NULL, '水利设施管理菜单');

-- 6. 添加实时监控子菜单
INSERT INTO "SYS_MENU" VALUES (2005, '实时监控', 2000, 5, 'monitor', 'watershed/monitor/index', '', 1, 0, 'C', '0', '0', 'watershed:monitor:list', 'chart', 'admin', '2023-12-29 10:00:00', '', NULL, '实时监控菜单');

-- 先删除已存在的角色菜单关联
DELETE FROM "SYS_ROLE_MENU" WHERE menu_id >= 2000;

-- 7. 添加管理员角色菜单关联
INSERT INTO "SYS_ROLE_MENU" VALUES (1, 2000);
INSERT INTO "SYS_ROLE_MENU" VALUES (1, 2001);
INSERT INTO "SYS_ROLE_MENU" VALUES (1, 2002);
INSERT INTO "SYS_ROLE_MENU" VALUES (1, 2003);
INSERT INTO "SYS_ROLE_MENU" VALUES (1, 2004);
INSERT INTO "SYS_ROLE_MENU" VALUES (1, 2005);