SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- CRM管理后台菜单数据
-- ----------------------------
BEGIN;

-- 车辆管理模块（从2035开始，避免ID冲突）
-- 二、车辆管理
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2035, '车辆管理', '', 1, 30, 0, '/vehicle', 'ep:truck', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2036, '车辆档案', 'vehicle:archive:query', 2, 1, 2035, 'archive', 'ep:document', 'vehicle/archive/index', 'VehicleArchive', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2046, '车辆图库', 'vehicle:gallery:query', 2, 2, 2035, 'gallery', 'ep:picture', 'vehicle/gallery/index', 'VehicleGallery', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2045, '失窃监控', 'vehicle:theft:query', 2, 3, 2035, 'theft', 'ep:warning', 'vehicle/theft/index', 'VehicleTheft', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 三、车辆设置（独立的一级菜单）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2038, '车辆设置', '', 1, 31, 0, '/vehicle-setting', 'ep:setting', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2039, '使用指南与支持', 'vehicle:guide:query', 2, 1, 2038, 'guide', 'ep:document', 'vehicle/guide/index', 'VehicleGuide', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2040, 'APP音效管理', 'vehicle:sound:query', 2, 2, 2038, 'sound', 'ep:headset', 'vehicle/sound/index', 'VehicleSound', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2042, '车辆授权设置', 'vehicle:auth:query', 2, 3, 2038, 'auth', 'ep:key', 'vehicle/auth/index', 'VehicleAuth', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2041, '分类管理', 'vehicle:category:query', 2, 4, 2038, 'category', 'ep:folder', 'vehicle/category/index', 'VehicleCategory', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 报警管理模块
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2048, '报警管理', '', 1, 32, 0, '/alarm', 'ep:bell', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2049, '报警处理', 'alarm:handle:query', 2, 1, 2048, 'handle', 'ep:tools', 'alarm/handle/index', 'AlarmHandle', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2050, '报警规则', 'alarm:rule:query', 2, 2, 2048, 'rule', 'ep:setting', 'alarm/rule/index', 'AlarmRule', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2051, '报警分类', 'alarm:category:query', 2, 3, 2048, 'category', 'ep:folder', 'alarm/category/index', 'AlarmCategory', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 会员管理补充（用户管理ID为1288）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2052, '维保记录', 'member:maintenance:query', 2, 5, 1288, 'maintenance', 'ep:tools', 'member/maintenance/index', 'MemberMaintenance', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2053, '骑行数据', 'member:riding:query', 2, 6, 1288, 'riding', 'ep:data-line', 'member/riding/index', 'MemberRiding', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2054, '意见反馈', 'member:feedback:query', 2, 7, 1288, 'feedback', 'ep:chat-line-round', 'member/feedback/index', 'MemberFeedback', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2055, '登录记录', 'member:login-log:query', 2, 8, 1288, 'login-log', 'ep:document', 'member/login-log/index', 'MemberLoginLog', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2056, '积分规则', 'member:point:rule:query', 2, 9, 1288, 'point/rule', 'ep:medal', 'member/point/rule/index', 'PointRule', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2057, '成长值规则', 'member:experience:rule:query', 2, 10, 1288, 'experience/rule', 'ep:star', 'member/experience/rule/index', 'ExperienceRule', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2058, '积分明细', 'member:point:detail:query', 2, 11, 1288, 'point/detail', 'ep:list', 'member/point/detail/index', 'PointDetail', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2059, '成长值明细', 'member:experience:detail:query', 2, 12, 1288, 'experience/detail', 'ep:list', 'member/experience/detail/index', 'ExperienceDetail', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 五、社区管理
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2000, '社区管理', '', 1, 29, 0, '/community', 'ep:chat-dot-round', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2075, '文章管理', 'community:post:query', 2, 1, 2000, 'post', 'ep:document', 'community/post/index', 'CommunityPost', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2062, '活动管理', 'community:activity:query', 2, 2, 2000, 'activity/list', 'ep:calendar', 'community/activity/list/index', 'ActivityList', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2063, 'Banner管理', 'community:banner:query', 2, 3, 2000, 'banner', 'ep:picture', 'community/banner/index', 'Banner', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2076, '敏感词管理', 'community:sensitive-word:query', 2, 4, 2000, 'sensitive', 'ep:warning', 'community/sensitive/index', 'CommunitySensitiveWord', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2060, '封禁管理', 'community:ban:query', 2, 5, 2000, 'ban', 'ep:lock', 'community/ban/index', 'CommunityBan', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2061, '举报管理', 'community:report:query', 2, 6, 2000, 'report', 'ep:warning-filled', 'community/report/index', 'CommunityReport', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 服务管理模块
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2065, '服务管理', '', 1, 33, 0, '/service', 'ep:service', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2066, 'APP意见反馈', 'service:feedback:query', 2, 1, 2065, 'feedback', 'ep:chat-line-round', 'service/feedback/index', 'ServiceFeedback', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2067, '服务评价管理', 'service:evaluation:query', 2, 2, 2065, 'evaluation', 'ep:star', 'service/evaluation/index', 'ServiceEvaluation', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2068, '维保管理', 'service:maintenance:query', 2, 3, 2065, 'maintenance', 'ep:tools', 'service/maintenance/index', 'ServiceMaintenance', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2069, '消息管理', 'service:message:query', 2, 4, 2065, 'message', 'ep:message', 'service/message/index', 'ServiceMessage', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 统计报表模块
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2070, '统计报表', '', 1, 34, 0, '/report', 'ep:data-analysis', NULL, NULL, 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2071, '用户统计', 'report:user:query', 2, 1, 2070, 'user', 'ep:user', 'report/user/index', 'UserReport', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2072, '车辆统计', 'report:vehicle:query', 2, 2, 2070, 'vehicle', 'ep:truck', 'report/vehicle/index', 'VehicleReport', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

-- 系统管理补充（系统管理ID为1）
INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES 
(2073, 'APP管理', 'system:app:query', 2, 10, 1, 'app', 'ep:mobile', 'system/app/index', 'SystemApp', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0'),
(2074, '协议管理', 'system:agreement:query', 2, 11, 1, 'agreement', 'ep:document', 'system/agreement/index', 'SystemAgreement', 0, b'1', b'1', b'1', 'admin', NOW(), 'admin', NOW(), b'0');

COMMIT;
SET FOREIGN_KEY_CHECKS = 1;

