-- =====================================================
-- 菜单权限SQL：员工实体关系模块
-- 创建时间: 2026-02-09
-- 说明: 员工实体关系菜单及其按钮权限
-- 注意: parent_id 需要根据实际菜单结构调整
-- =====================================================

-- =====================================================
-- 一、主菜单配置
-- =====================================================

-- 员工实体关系菜单
-- 注意: parent_id = 2000 是"信息维护"一级菜单，如需调整请修改此值
-- order_num = 3 表示在"信息维护"下的排序位置（中介黑名单=1，员工信息=2，员工实体关系=3）
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2030, '员工实体关系', 2000, 3, 'staffEnterpriseRelation', 'ccdiStaffEnterpriseRelation/index', NULL, NULL, 1, 0,
        'C', '0', '0', 'ccdi:staffEnterpriseRelation:list', '#', 'admin', NOW(), '员工实体关系菜单');

-- =====================================================
-- 二、按钮权限配置
-- =====================================================

-- 员工实体关系查询权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2031, '员工实体关系查询', 2030, 1, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:query', '#', 'admin', NOW(), '');

-- 员工实体关系列表权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2032, '员工实体关系列表', 2030, 2, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:list', '#', 'admin', NOW(), '');

-- 员工实体关系新增权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2033, '员工实体关系新增', 2030, 3, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:add', '#', 'admin', NOW(), '');

-- 员工实体关系修改权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2034, '员工实体关系修改', 2030, 4, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:edit', '#', 'admin', NOW(), '');

-- 员工实体关系删除权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2035, '员工实体关系删除', 2030, 5, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:remove', '#', 'admin', NOW(), '');

-- 员工实体关系导出权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2036, '员工实体关系导出', 2030, 6, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:export', '#', 'admin', NOW(), '');

-- 员工实体关系导入权限
INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache,
                     menu_type, visible, status, perms, icon, create_by, create_time, remark)
VALUES (2037, '员工实体关系导入', 2030, 7, '', NULL, NULL, NULL, 1, 0, 'F', '0', '0',
        'ccdi:staffEnterpriseRelation:import', '#', 'admin', NOW(), '');

-- =====================================================
-- 三、权限标识说明
-- =====================================================
-- ccdi:staffEnterpriseRelation:query   - 查询详情权限
-- ccdi:staffEnterpriseRelation:list    - 查询列表权限
-- ccdi:staffEnterpriseRelation:add     - 新增权限
-- ccdi:staffEnterpriseRelation:edit    - 修改权限
-- ccdi:staffEnterpriseRelation:remove  - 删除权限
-- ccdi:staffEnterpriseRelation:export  - 导出权限
-- ccdi:staffEnterpriseRelation:import  - 导入权限

-- =====================================================
-- 四、菜单关联说明
-- =====================================================
-- 上级菜单：menu_id = 2000（信息维护）
-- 同级菜单：
--   - menu_id = 2001（中介黑名单管理）
--   - menu_id = 2002（员工信息维护）
--   - menu_id = 2030（员工实体关系）[本菜单]

-- =====================================================
-- 五、回滚SQL（如需删除这些菜单，执行以下语句）
-- =====================================================
-- DELETE FROM sys_menu WHERE menu_id BETWEEN 2030 AND 2037;
