-- ============================================================================
-- 数字员工 sys_menu 补全（按前端 router 缺失菜单补齐）
-- 父菜单：2951=数字员工、2992=语料与提示词、2993=运维监控
-- 新增父菜单：2994=对话测试与质量、2995=多模型与配置
-- ============================================================================

-- 1) 新增两个父菜单分组
INSERT IGNORE INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
VALUES
(2994, '对话测试与质量', 2951, 5, 'lobsterChatTest', NULL, 1, 0, 'M', '0', '0', NULL, 'message', 'admin', NOW()),
(2995, '多模型与配置',   2951, 6, 'lobsterConfig',   NULL, 1, 0, 'M', '0', '0', NULL, 'tools',   'admin', NOW());

-- 2) 任务执行（实例监控）/ Token 消耗统计 → 运维监控(2993)
INSERT IGNORE INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
VALUES
(2996, '任务执行(实例监控)', 2993, 1, 'lobster-instance',     'lobster/instance/index',     1, 0, 'C', '0', '0', 'workflow:lobster:instance',  'monitor',       'admin', NOW()),
(2997, 'Token消耗统计',      2993, 5, 'lobster-token-stats',  'lobster/token-stats/index',  1, 0, 'C', '0', '0', 'workflow:lobster:token',     'coin',          'admin', NOW());

-- 3) 用户画像 / 摘要生成 / 消息去重 / 敏感词库 → 语料与提示词(2992)
INSERT IGNORE INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
VALUES
(2998, '用户画像配置', 2992, 3, 'lobster-profile-config',  'lobster/profile-config/index',  1, 0, 'C', '0', '0', 'workflow:lobster:profile',    'user',     'admin', NOW()),
(3000, '消息去重配置', 2992, 5, 'lobster-dedup-config',    'lobster/dedup-config/index',    1, 0, 'C', '0', '0', 'workflow:lobster:dedup',      'filter',   'admin', NOW()),
(3001, '敏感词库',     2992, 6, 'lobster-sensitive-words', 'lobster/sensitive-words/index', 1, 0, 'C', '0', '0', 'workflow:lobster:sensitive',  'warning',  'admin', NOW());

-- 4) 聚合聊天 / 模拟聊天测试 / 评分准确性验证 → 对话测试与质量(2994)
INSERT IGNORE INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
VALUES
(3002, '聚合聊天',         2994, 1, 'lobster-chat-aggregate', 'lobster/chat-aggregate/index', 1, 0, 'C', '0', '0', 'workflow:lobster:chat',      'message',         'admin', NOW()),
(3003, '模拟聊天测试',     2994, 2, 'lobster-chat-test',      'lobster/chat-test/index',      1, 0, 'C', '0', '0', 'workflow:lobster:chattest',  'chat-dot-square', 'admin', NOW()),
(3004, '评分准确性验证',   2994, 3, 'lobster-quality-verify', 'lobster/quality-verify/index', 1, 0, 'C', '0', '0', 'workflow:lobster:quality',   'data-analysis',   'admin', NOW());

-- 5) 多模型路由配置 → 多模型与配置(2995)
INSERT IGNORE INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
VALUES
(3005, '多模型路由配置', 2995, 1, 'lobster-model-route', 'lobster/model-route/index', 1, 0, 'C', '0', '0', 'workflow:lobster:modelroute', 'guide', 'admin', NOW());

-- 6) 隐藏前端不再展示的菜单（工作流画布 2974、新建工作流 2975）
UPDATE sys_menu SET visible = '1' WHERE menu_id IN (2974, 2975);
