-- ========================================
-- 牟野管理 + TIK 管理模块菜单 SQL
-- 说明: 全局菜单（无 tenant_id 字段），所有租户共享
-- 租户隔离通过 system_role 和 system_role_menu 实现
-- ========================================

-- ==================== 牟野管理模块 ====================

-- 牟野管理 - 父目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('牟野管理', '', 1, 100, 0, '/muye', 'ep:menu', '', '', 0, 1, 1, 1, '1', '1', 0);

-- AI智能体 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI智能体', '', 1, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'aiagent', 'ep:user', '', '', 0, 1, 1, 1, '1', '1', 0);

-- AI智能体 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI智能体列表', 'muye:aiagent:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI智能体' AND path='aiagent' LIMIT 1) AS temp), '', 'ep:list', 'muye/aiagent/index', 'MuyeAiAgent', 0, 1, 1, 1, '1', '1', 0);

-- AI智能体 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI智能体新增', 'muye:aiagent:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI智能体列表' AND component='muye/aiagent/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI智能体修改', 'muye:aiagent:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI智能体列表' AND component='muye/aiagent/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI智能体删除', 'muye:aiagent:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI智能体列表' AND component='muye/aiagent/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- AI应用 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI应用', '', 1, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'aiapplication', 'ep:star', '', '', 0, 1, 1, 1, '1', '1', 0);

-- AI应用 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI应用列表', 'muye:aiapplication:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI应用' AND path='aiapplication' LIMIT 1) AS temp), '', 'ep:list', 'muye/aiapplication/index', 'MuyeAiApplication', 0, 1, 1, 1, '1', '1', 0);

-- AI应用 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI应用新增', 'muye:aiapplication:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI应用列表' AND component='muye/aiapplication/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI应用修改', 'muye:aiapplication:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI应用列表' AND component='muye/aiapplication/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI应用删除', 'muye:aiapplication:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI应用列表' AND component='muye/aiapplication/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- AI模型配置 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI模型配置', '', 1, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'aimodelconfig', 'ep:setting', '', '', 0, 1, 1, 1, '1', '1', 0);

-- AI模型配置 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI模型配置列表', 'muye:aimodelconfig:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI模型配置' AND path='aimodelconfig' LIMIT 1) AS temp), '', 'ep:list', 'muye/aimodelconfig/index', 'MuyeAiModelConfig', 0, 1, 1, 1, '1', '1', 0);

-- AI模型配置 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI模型配置新增', 'muye:aimodelconfig:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI模型配置列表' AND component='muye/aimodelconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI模型配置修改', 'muye:aimodelconfig:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI模型配置列表' AND component='muye/aimodelconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('AI模型配置删除', 'muye:aimodelconfig:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='AI模型配置列表' AND component='muye/aimodelconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- ==================== 会员管理模块 ====================

-- 会员礼包 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员礼包', '', 1, 4, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'membergiftpackage', 'ep:present', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 会员礼包 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员礼包列表', 'muye:membergiftpackage:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员礼包' AND path='membergiftpackage' LIMIT 1) AS temp), '', 'ep:list', 'muye/membergiftpackage/index', 'MuyeMemberGiftPackage', 0, 1, 1, 1, '1', '1', 0);

-- 会员礼包 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员礼包新增', 'muye:membergiftpackage:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员礼包列表' AND component='muye/membergiftpackage/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员礼包修改', 'muye:membergiftpackage:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员礼包列表' AND component='muye/membergiftpackage/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员礼包删除', 'muye:membergiftpackage:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员礼包列表' AND component='muye/membergiftpackage/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- 会员充值记录 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员充值记录', '', 1, 5, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'memberrechargerecord', 'ep:money', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 会员充值记录 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员充值记录列表', 'muye:memberrechargerecord:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员充值记录' AND path='memberrechargerecord' LIMIT 1) AS temp), '', 'ep:list', 'muye/memberrechargerecord/index', 'MuyeMemberRechargeRecord', 0, 1, 1, 1, '1', '1', 0);

-- 会员充值记录 - 导出按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员充值记录导出', 'muye:memberrechargerecord:export', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员充值记录列表' AND component='muye/memberrechargerecord/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- 会员用户权限 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户权限', '', 1, 6, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'memberuserpermission', 'ep:lock', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 会员用户权限 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户权限列表', 'muye:memberuserpermission:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员用户权限' AND path='memberuserpermission' LIMIT 1) AS temp), '', 'ep:list', 'muye/memberuserpermission/index', 'MuyeMemberUserPermission', 0, 1, 1, 1, '1', '1', 0);

-- 会员用户权限 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户权限新增', 'muye:memberuserpermission:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员用户权限列表' AND component='muye/memberuserpermission/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户权限修改', 'muye:memberuserpermission:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员用户权限列表' AND component='muye/memberuserpermission/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户权限删除', 'muye:memberuserpermission:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员用户权限列表' AND component='muye/memberuserpermission/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- 会员用户画像 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户画像', '', 1, 7, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'memberuserprofile', 'ep:user-filled', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 会员用户画像 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户画像列表', 'muye:memberuserprofile:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员用户画像' AND path='memberuserprofile' LIMIT 1) AS temp), '', 'ep:list', 'muye/memberuserprofile/index', 'MuyeMemberUserProfile', 0, 1, 1, 1, '1', '1', 0);

-- 会员用户画像 - 导出按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('会员用户画像导出', 'muye:memberuserprofile:export', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='会员用户画像列表' AND component='muye/memberuserprofile/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- ==================== 积分管理模块 ====================

-- 积分兑换配置 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分兑换配置', '', 1, 8, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'pointexchangeconfig', 'ep:goods', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 积分兑换配置 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分兑换配置列表', 'muye:pointexchangeconfig:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分兑换配置' AND path='pointexchangeconfig' LIMIT 1) AS temp), '', 'ep:list', 'muye/pointexchangeconfig/index', 'MuyePointExchangeConfig', 0, 1, 1, 1, '1', '1', 0);

-- 积分兑换配置 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分兑换配置新增', 'muye:pointexchangeconfig:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分兑换配置列表' AND component='muye/pointexchangeconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分兑换配置修改', 'muye:pointexchangeconfig:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分兑换配置列表' AND component='muye/pointexchangeconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分兑换配置删除', 'muye:pointexchangeconfig:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分兑换配置列表' AND component='muye/pointexchangeconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- 积分充值配置 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分充值配置', '', 1, 9, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'pointrechargeconfig', 'ep:wallet', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 积分充值配置 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分充值配置列表', 'muye:pointrechargeconfig:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分充值配置' AND path='pointrechargeconfig' LIMIT 1) AS temp), '', 'ep:list', 'muye/pointrechargeconfig/index', 'MuyePointRechargeConfig', 0, 1, 1, 1, '1', '1', 0);

-- 积分充值配置 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分充值配置新增', 'muye:pointrechargeconfig:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分充值配置列表' AND component='muye/pointrechargeconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分充值配置修改', 'muye:pointrechargeconfig:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分充值配置列表' AND component='muye/pointrechargeconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分充值配置删除', 'muye:pointrechargeconfig:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分充值配置列表' AND component='muye/pointrechargeconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- 积分记录 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分记录', '', 1, 10, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'pointrecord', 'ep:document', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 积分记录 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分记录列表', 'muye:pointrecord:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分记录' AND path='pointrecord' LIMIT 1) AS temp), '', 'ep:list', 'muye/pointrecord/index', 'MuyePointRecord', 0, 1, 1, 1, '1', '1', 0);

-- 积分记录 - 导出按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分记录导出', 'muye:pointrecord:export', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分记录列表' AND component='muye/pointrecord/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- 积分签到配置 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分签到配置', '', 1, 11, (SELECT id FROM (SELECT id FROM system_menu WHERE name='牟野管理' AND path='/muye' LIMIT 1) AS temp), 'pointsigninconfig', 'ep:calendar', '', '', 0, 1, 1, 1, '1', '1', 0);

-- 积分签到配置 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分签到配置列表', 'muye:pointsigninconfig:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分签到配置' AND path='pointsigninconfig' LIMIT 1) AS temp), '', 'ep:list', 'muye/pointsigninconfig/index', 'MuyePointSignInConfig', 0, 1, 1, 1, '1', '1', 0);

-- 积分签到配置 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分签到配置新增', 'muye:pointsigninconfig:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分签到配置列表' AND component='muye/pointsigninconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分签到配置修改', 'muye:pointsigninconfig:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分签到配置列表' AND component='muye/pointsigninconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('积分签到配置删除', 'muye:pointsigninconfig:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='积分签到配置列表' AND component='muye/pointsigninconfig/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);

-- ==================== TIK 管理模块 ====================

-- TIK管理 - 父目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('TIK管理', '', 1, 101, 0, '/tik', 'ep:menu', '', '', 0, 1, 1, 1, '1', '1', 0);

-- Token管理 - 子目录
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('Token管理', '', 1, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='TIK管理' AND path='/tik' LIMIT 1) AS temp), 'token', 'ep:key', '', '', 0, 1, 1, 1, '1', '1', 0);

-- Token管理 - 列表菜单
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('Token管理列表', 'tik:token:query', 2, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='Token管理' AND path='token' LIMIT 1) AS temp), '', 'ep:list', 'tik/token/index', 'TikToken', 0, 1, 1, 1, '1', '1', 0);

-- Token管理 - 新增/修改/删除按钮
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('Token管理新增', 'tik:token:create', 3, 1, (SELECT id FROM (SELECT id FROM system_menu WHERE name='Token管理列表' AND component='tik/token/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('Token管理修改', 'tik:token:update', 3, 2, (SELECT id FROM (SELECT id FROM system_menu WHERE name='Token管理列表' AND component='tik/token/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
INSERT INTO system_menu (name, permission, type, sort, parent_id, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES ('Token管理删除', 'tik:token:delete', 3, 3, (SELECT id FROM (SELECT id FROM system_menu WHERE name='Token管理列表' AND component='tik/token/index' LIMIT 1) AS temp), 0, 1, 1, 1, '1', '1', 0);
