-- ============================================
-- 轻医美+生活美容连锁机构模拟数据
-- 版本：1.0.0
-- 创建时间：2025-01-20
-- ============================================

USE `kaopeilian`;

-- 清理已有测试数据（保留初始的superadmin、admin、testuser）
DELETE FROM training_reports WHERE id > 0;
DELETE FROM training_messages WHERE id > 0;
DELETE FROM training_sessions WHERE id > 0;
DELETE FROM exam_results WHERE id > 0;
DELETE FROM exams WHERE id > 0;
DELETE FROM questions WHERE course_id > 4;
DELETE FROM knowledge_points WHERE course_id > 4;
DELETE FROM course_materials WHERE course_id > 4;
DELETE FROM user_teams WHERE user_id > 3;
DELETE FROM teams WHERE id > 3;
DELETE FROM courses WHERE id > 4;
DELETE FROM training_scenes WHERE id > 3;
DELETE FROM growth_paths WHERE id > 2;
DELETE FROM users WHERE id > 3;

-- ============================================
-- 一、用户数据（轻医美+生活美容机构人员）
-- ============================================

-- 管理层
INSERT INTO users (username, email, phone, hashed_password, full_name, role, is_active, is_verified, bio) VALUES
('zhangyun', 'zhangyun@beauty.com', '13800138001', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '张云', 'admin', TRUE, TRUE, '集团总经理，20年美容行业经验'),
('lixiaoli', 'lixiaoli@beauty.com', '13800138002', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '李晓丽', 'manager', TRUE, TRUE, '华东区域经理，负责上海、江苏、浙江区域'),
('wangmei', 'wangmei@beauty.com', '13800138003', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '王梅', 'manager', TRUE, TRUE, '华南区域经理，负责广东、福建区域'),

-- 医美部门
('drchen', 'drchen@beauty.com', '13800138004', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '陈医生', 'manager', TRUE, TRUE, '医美技术总监，皮肤科主治医师'),
('liujing', 'liujing@beauty.com', '13800138005', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '刘静', 'trainee', TRUE, TRUE, '资深医美顾问，5年从业经验'),
('zhangmin', 'zhangmin@beauty.com', '13800138006', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '张敏', 'trainee', TRUE, TRUE, '医美技师，擅长光电项目操作'),
('sunhui', 'sunhui@beauty.com', '13800138007', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '孙慧', 'trainee', TRUE, TRUE, '医美技师，专注水光针注射'),

-- 美容部门
('zhaoxue', 'zhaoxue@beauty.com', '13800138008', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '赵雪', 'manager', TRUE, TRUE, '美容部主管，国家高级美容师'),
('yangli', 'yangli@beauty.com', '13800138009', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '杨丽', 'trainee', TRUE, TRUE, '资深美容顾问，擅长皮肤管理方案设计'),
('huangting', 'huangting@beauty.com', '13800138010', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '黄婷', 'trainee', TRUE, TRUE, '美容师，专注面部护理'),
('linwei', 'linwei@beauty.com', '13800138011', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '林薇', 'trainee', TRUE, TRUE, '美容师，擅长身体SPA'),
('chenyu', 'chenyu@beauty.com', '13800138012', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '陈雨', 'trainee', TRUE, TRUE, '美容师，专注问题性皮肤护理'),

-- 客服部门
('wujuan', 'wujuan@beauty.com', '13800138013', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '吴娟', 'manager', TRUE, TRUE, '客服部经理，负责客户关系管理'),
('zhoufang', 'zhoufang@beauty.com', '13800138014', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '周芳', 'trainee', TRUE, TRUE, '客户经理，负责VIP客户维护'),
('xujing', 'xujing@beauty.com', '13800138015', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '徐静', 'trainee', TRUE, TRUE, '前台接待，形象气质佳'),

-- 各分店人员
('liuyan', 'liuyan@beauty.com', '13800138016', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '刘燕', 'manager', TRUE, TRUE, '静安店店长'),
('zhangna', 'zhangna@beauty.com', '13800138017', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '张娜', 'trainee', TRUE, TRUE, '静安店美容顾问'),
('wangxin', 'wangxin@beauty.com', '13800138018', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '王欣', 'trainee', TRUE, TRUE, '静安店美容师'),
('lihong', 'lihong@beauty.com', '13800138019', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '李红', 'manager', TRUE, TRUE, '徐汇店店长'),
('zhaoli', 'zhaoli@beauty.com', '13800138020', '$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewKyNiQdP/sQj6C6', '赵丽', 'trainee', TRUE, TRUE, '徐汇店医美顾问');

-- ============================================
-- 二、团队数据（机构组织架构）
-- ============================================

-- 公司总部
INSERT INTO teams (name, code, description, team_type, leader_id) VALUES
('集团总部', 'HQ', '轻医美生活美容集团总部', 'department', 4),
('医美事业部', 'MEDICAL', '负责所有医美项目的运营和技术支持', 'department', 7),
('美容事业部', 'BEAUTY', '负责传统美容项目的运营和培训', 'department', 11),
('客服中心', 'SERVICE', '负责客户服务和关系维护', 'department', 16),

-- 区域团队
('华东区域', 'EAST', '负责上海、江苏、浙江区域运营', 'department', 5),
('华南区域', 'SOUTH', '负责广东、福建区域运营', 'department', 6),

-- 门店团队
('静安旗舰店', 'JINGAN', '上海静安区旗舰店', 'department', 19),
('徐汇精品店', 'XUHUI', '上海徐汇区精品店', 'department', 22),

-- 专项小组
('医美技术委员会', 'MED_TECH', '负责医美技术标准制定和培训', 'study_group', 7),
('美容技术研究组', 'BEAUTY_RES', '负责美容新技术研究和推广', 'study_group', 11),
('服务标准化小组', 'SERVICE_STD', '负责服务流程标准化', 'study_group', 16);

-- ============================================
-- 三、用户团队关联
-- ============================================

INSERT INTO user_teams (user_id, team_id, role) VALUES
-- 总经理管理总部
(4, 4, 'leader'),
-- 区域经理
(5, 8, 'leader'),
(6, 9, 'leader'),
-- 部门负责人
(7, 5, 'leader'),
(11, 6, 'leader'),
(16, 7, 'leader'),
-- 医美部门成员
(7, 12, 'leader'),
(8, 5, 'member'),
(9, 5, 'member'),
(10, 5, 'member'),
-- 美容部门成员
(11, 13, 'leader'),
(12, 6, 'member'),
(13, 6, 'member'),
(14, 6, 'member'),
(15, 6, 'member'),
-- 客服部门成员
(17, 7, 'member'),
(18, 7, 'member'),
-- 门店团队
(19, 10, 'leader'),
(20, 10, 'member'),
(21, 10, 'member'),
(22, 11, 'leader'),
(23, 11, 'member');

-- ============================================
-- 四、课程数据（美容行业培训课程）
-- ============================================

DELETE FROM courses WHERE id > 4;

INSERT INTO courses (name, description, category, status, cover_image, duration_hours, difficulty_level, tags, published_at, is_featured, created_by) VALUES
-- 基础课程
('美容基础理论', '美容行业入门必修课，包含皮肤生理学、美容营养学等基础知识', 'general', 'published', '/uploads/course/beauty_basic.jpg', 20, 1, '["美容基础", "皮肤管理", "理论知识"]', '2024-01-15 10:00:00', TRUE, 4),
('轻医美项目认知', '了解主流轻医美项目的原理、适应症和操作流程', 'technology', 'published', '/uploads/course/medical_beauty.jpg', 30, 2, '["轻医美", "水光针", "光电项目"]', '2024-01-20 14:00:00', TRUE, 7),
('销售心理学与话术', '掌握美容行业销售技巧，提升业绩转化能力', 'business', 'published', '/uploads/course/sales_skill.jpg', 15, 2, '["销售技巧", "客户心理", "话术"]', '2024-02-01 09:00:00', TRUE, 16),
('产品知识大全', '全面了解各类护肤品成分、功效和搭配方案', 'technology', 'published', '/uploads/course/product_knowledge.jpg', 25, 2, '["产品知识", "成分分析", "护肤"]', '2024-02-10 11:00:00', FALSE, 11),
('客户服务标准流程', '标准化服务流程培训，提升客户满意度', 'management', 'published', '/uploads/course/service_process.jpg', 12, 1, '["服务流程", "客户体验", "标准化"]', '2024-02-15 15:00:00', TRUE, 16),
('卫生安全操作规范', '医美和美容项目的卫生安全标准培训', 'general', 'published', '/uploads/course/safety_standard.jpg', 8, 1, '["安全规范", "卫生标准", "操作流程"]', '2024-02-20 10:00:00', TRUE, 7),

-- 进阶课程
('面部美容手法精修', '深入学习各种面部护理手法和技巧', 'technology', 'published', '/uploads/course/facial_technique.jpg', 40, 3, '["面部护理", "手法技巧", "实操"]', '2024-03-01 14:00:00', FALSE, 11),
('光电仪器操作认证', '各类美容仪器的原理和操作技巧培训', 'technology', 'published', '/uploads/course/device_operation.jpg', 35, 3, '["仪器操作", "光电美容", "认证培训"]', '2024-03-10 09:00:00', TRUE, 7),
('问题性皮肤管理', '针对各类问题性皮肤的诊断和护理方案', 'technology', 'published', '/uploads/course/problem_skin.jpg', 30, 4, '["问题皮肤", "痘痘", "敏感肌", "诊断"]', '2024-03-15 11:00:00', FALSE, 11),
('VIP客户管理艺术', '高端客户的维护技巧和管理策略', 'management', 'published', '/uploads/course/vip_management.jpg', 18, 3, '["VIP管理", "客户维护", "高端服务"]', '2024-03-20 15:00:00', FALSE, 16),

-- 管理课程
('美容店务管理', '美容门店的日常运营和管理技巧', 'management', 'published', '/uploads/course/store_management.jpg', 20, 3, '["店务管理", "运营", "团队建设"]', '2024-04-01 10:00:00', FALSE, 19),
('团队激励与培养', '如何打造高效的美容服务团队', 'management', 'published', '/uploads/course/team_building.jpg', 15, 3, '["团队管理", "员工激励", "人才培养"]', '2024-04-10 14:00:00', FALSE, 4);

-- ============================================
-- 五、课程资料
-- ============================================

-- 为新课程添加资料
INSERT INTO course_materials (course_id, name, description, file_url, file_type, file_size, sort_order) VALUES
-- 美容基础理论
(5, '皮肤生理学基础.pdf', '详细介绍皮肤结构和生理功能', '/uploads/materials/skin_physiology.pdf', 'pdf', 5242880, 1),
(5, '美容营养学.pdf', '营养与美容的关系', '/uploads/materials/beauty_nutrition.pdf', 'pdf', 3145728, 2),
(5, '基础理论视频课程', '完整的理论知识讲解', '/uploads/materials/theory_video.mp4', 'mp4', 209715200, 3),

-- 轻医美项目认知
(6, '水光针操作指南.pdf', '水光针注射标准操作流程', '/uploads/materials/hydra_injection.pdf', 'pdf', 4194304, 1),
(6, '光电项目原理详解.ppt', '各类光电项目的原理和效果', '/uploads/materials/photoelectric.ppt', 'ppt', 10485760, 2),
(6, '操作演示视频', '真人操作演示教学', '/uploads/materials/operation_demo.mp4', 'mp4', 314572800, 3),

-- 销售心理学与话术
(7, '客户心理分析.pdf', '不同类型客户的心理特征', '/uploads/materials/customer_psychology.pdf', 'pdf', 2097152, 1),
(7, '标准话术手册.doc', '各场景标准话术模板', '/uploads/materials/sales_scripts.doc', 'doc', 1048576, 2),
(7, '销售实战案例.mp4', '优秀销售案例分享', '/uploads/materials/sales_cases.mp4', 'mp4', 157286400, 3);

-- ============================================
-- 六、知识点体系
-- ============================================

-- 美容基础理论知识点
INSERT INTO knowledge_points (course_id, name, description, parent_id, level, path, sort_order, weight, is_required, estimated_hours) VALUES
(5, '皮肤生理学', '了解皮肤的结构和功能', NULL, 1, '1', 1, 2.0, TRUE, 5),
(5, '皮肤结构', '表皮、真皮、皮下组织的构成', 25, 2, '1.1', 1, 1.5, TRUE, 2),
(5, '皮肤类型判断', '干性、油性、混合性、敏感性皮肤的特征', 25, 2, '1.2', 2, 1.5, TRUE, 1.5),
(5, '美容营养学', '营养素对皮肤的影响', NULL, 1, '2', 2, 1.5, TRUE, 4),
(5, '维生素与美容', '各类维生素的美容功效', 28, 2, '2.1', 1, 1.0, TRUE, 2),

-- 轻医美项目知识点
(6, '注射类项目', '各类注射美容项目介绍', NULL, 1, '1', 1, 2.5, TRUE, 10),
(6, '水光针技术', '水光针的原理和操作要点', 30, 2, '1.1', 1, 2.0, TRUE, 4),
(6, '肉毒素注射', '肉毒素的作用原理和注射技巧', 30, 2, '1.2', 2, 2.0, TRUE, 3),
(6, '光电类项目', '光电美容技术详解', NULL, 1, '2', 2, 2.5, TRUE, 12),
(6, '激光美容', '各类激光的原理和应用', 33, 2, '2.1', 1, 2.0, TRUE, 5);

-- ============================================
-- 七、考试题目（美容行业相关）
-- ============================================

-- 美容基础理论题目
INSERT INTO questions (course_id, question_type, title, content, options, correct_answer, explanation, score, difficulty, tags) VALUES
(5, 'single_choice', '皮肤最外层的结构是？', NULL, '{"A": "真皮层", "B": "表皮层", "C": "皮下组织", "D": "基底层"}', 'B', '皮肤由外到内分为表皮层、真皮层和皮下组织', 10.0, 'easy', '["皮肤结构", "基础知识"]'),
(5, 'single_choice', '以下哪种维生素被称为"美容维生素"？', NULL, '{"A": "维生素A", "B": "维生素B", "C": "维生素C", "D": "维生素D"}', 'C', '维生素C具有抗氧化、美白、促进胶原蛋白合成的作用', 10.0, 'easy', '["营养学", "维生素"]'),
(5, 'true_false', '油性皮肤不需要补水', NULL, NULL, 'false', '油性皮肤也需要补水，缺水会导致皮肤分泌更多油脂', 10.0, 'medium', '["皮肤类型", "护理误区"]'),
(5, 'fill_blank', '皮肤的pH值呈____性', NULL, NULL, '弱酸', '健康皮肤的pH值在4.5-6.5之间，呈弱酸性', 10.0, 'easy', '["皮肤生理"]'),

-- 轻医美项目题目
(6, 'single_choice', '水光针注射的层次是？', NULL, '{"A": "表皮层", "B": "真皮浅层", "C": "真皮深层", "D": "皮下组织"}', 'B', '水光针通常注射在真皮浅层，有利于营养成分的吸收', 10.0, 'medium', '["水光针", "注射技术"]'),
(6, 'single_choice', '肉毒素的作用原理是？', NULL, '{"A": "填充凹陷", "B": "阻断神经肌肉传导", "C": "刺激胶原再生", "D": "溶解脂肪"}', 'B', '肉毒素通过阻断神经肌肉传导，使肌肉放松，从而减少皱纹', 10.0, 'medium', '["肉毒素", "作用原理"]'),
(6, 'multiple_choice', '以下哪些是光子嫩肤的适应症？（多选）', NULL, '{"A": "色斑", "B": "毛孔粗大", "C": "红血丝", "D": "深度皱纹"}', '["A", "B", "C"]', '光子嫩肤适用于浅表性皮肤问题，对深度皱纹效果有限', 15.0, 'hard', '["光电项目", "适应症"]'),

-- 销售技巧题目
(7, 'single_choice', '面对犹豫不决的客户，最好的策略是？', NULL, '{"A": "立即降价", "B": "强调限时优惠", "C": "了解顾虑并解答", "D": "推荐更贵的项目"}', 'C', '了解客户的具体顾虑并针对性解答，建立信任更重要', 10.0, 'medium', '["销售技巧", "客户心理"]'),
(7, 'true_false', '销售时应该尽量推荐最贵的产品和项目', NULL, NULL, 'false', '应该根据客户的实际需求和消费能力推荐合适的产品', 10.0, 'easy', '["销售原则", "职业道德"]'),

-- 产品知识题目
(8, 'single_choice', '玻尿酸的主要功效是？', NULL, '{"A": "美白", "B": "保湿", "C": "去角质", "D": "控油"}', 'B', '玻尿酸是优秀的保湿成分，能吸收自身重量1000倍的水分', 10.0, 'easy', '["成分知识", "功效"]'),
(8, 'fill_blank', '视黄醇是维生素____的衍生物', NULL, NULL, 'A', '视黄醇（Retinol）是维生素A的衍生物，具有抗老功效', 10.0, 'medium', '["成分知识", "维生素"]'),

-- 服务流程题目
(9, 'single_choice', '客户到店后的第一步应该是？', NULL, '{"A": "推销产品", "B": "热情接待并了解需求", "C": "直接带去护理", "D": "要求办卡"}', 'B', '良好的接待和需求了解是优质服务的开始', 10.0, 'easy', '["服务流程", "接待"]'),
(9, 'true_false', '护理过程中可以接听私人电话', NULL, NULL, 'false', '护理过程中应专注于客户，避免接听私人电话', 10.0, 'easy', '["服务规范", "职业素养"]'),

-- 安全规范题目
(10, 'single_choice', '医美项目操作前必须进行的步骤是？', NULL, '{"A": "皮肤测试", "B": "签署知情同意书", "C": "拍照存档", "D": "以上都是"}', 'D', '医美项目需要做好充分的术前准备和风险告知', 10.0, 'medium', '["安全规范", "操作流程"]'),
(10, 'multiple_choice', '以下哪些属于无菌操作的要求？（多选）', NULL, '{"A": "戴无菌手套", "B": "使用一次性耗材", "C": "操作台面消毒", "D": "戴口罩"}', '["A", "B", "C", "D"]', '无菌操作需要全方位的防护和消毒措施', 15.0, 'medium', '["无菌操作", "卫生标准"]');

-- ============================================
-- 八、AI陪练场景（美容行业场景）
-- ============================================

DELETE FROM training_scenes WHERE id > 3;

INSERT INTO training_scenes (name, description, category, ai_config, prompt_template, evaluation_criteria, status, is_public, created_by) VALUES
('客户咨询接待', '模拟接待到店客户，了解需求并推荐合适的项目', '客户服务', 
'{"bot_id": "beauty_consultant_bot", "temperature": 0.7}', 
'你是一位专业的美容顾问，需要热情接待客户，了解客户的皮肤问题和需求，并推荐合适的护理项目。注意要专业、亲切、不过度推销。',
'{"professionalism": 30, "communication": 25, "needs_analysis": 25, "solution_matching": 20}',
'ACTIVE', TRUE, 16),

('产品成分咨询', '解答客户关于护肤品成分和功效的问题', '专业知识',
'{"bot_id": "ingredient_expert_bot", "temperature": 0.6}',
'你是一位护肤品成分专家，需要用通俗易懂的语言向客户解释各种成分的作用和适用人群。',
'{"accuracy": 35, "clarity": 30, "practicality": 20, "patience": 15}',
'ACTIVE', TRUE, 11),

('投诉处理演练', '处理客户投诉，化解矛盾，维护客户关系', '危机处理',
'{"bot_id": "complaint_handler_bot", "temperature": 0.8}',
'你扮演一位不满意的客户，对服务或效果有投诉。学员需要耐心倾听、理解客户情绪、提供解决方案。',
'{"empathy": 30, "problem_solving": 30, "communication": 25, "result": 15}',
'ACTIVE', TRUE, 16),

('美容手法指导', '一对一美容手法技巧指导和纠正', '技能培训',
'{"bot_id": "technique_trainer_bot", "temperature": 0.5}',
'你是一位资深美容培训师，指导学员正确的面部护理手法，包括力度、方向、节奏等细节。',
'{"technique_accuracy": 40, "comprehension": 30, "practice": 20, "safety": 10}',
'ACTIVE', TRUE, 11),

('销售话术演练', '练习不同场景下的销售话术和应对技巧', '销售技巧',
'{"bot_id": "sales_trainer_bot", "temperature": 0.7}',
'模拟各种类型的客户，让学员练习销售话术，包括产品介绍、异议处理、促成成交等。',
'{"persuasion": 25, "product_knowledge": 25, "objection_handling": 25, "closing": 25}',
'ACTIVE', TRUE, 16),

('医美项目咨询', '专业解答轻医美项目的原理、效果和注意事项', '医美咨询',
'{"bot_id": "medical_beauty_bot", "temperature": 0.6}',
'你是一位医美咨询师，需要专业、客观地介绍各种轻医美项目，包括适应症、恢复期、注意事项等。',
'{"professionalism": 35, "safety_awareness": 30, "communication": 20, "ethics": 15}',
'ACTIVE', TRUE, 7);

-- ============================================
-- 九、成长路径（美容行业职业发展）
-- ============================================

DELETE FROM growth_paths WHERE id > 2;

INSERT INTO growth_paths (name, description, target_role, courses, estimated_duration_days, is_active, sort_order) VALUES
('美容师成长路径', '从初级美容师到高级美容技师的完整学习路径', '高级美容技师', 
'[{"course_id": 5, "order": 1, "is_required": true}, 
  {"course_id": 8, "order": 2, "is_required": true},
  {"course_id": 9, "order": 3, "is_required": true},
  {"course_id": 10, "order": 4, "is_required": true},
  {"course_id": 11, "order": 5, "is_required": true},
  {"course_id": 13, "order": 6, "is_required": false}]', 
90, TRUE, 1),

('美容顾问发展路径', '培养专业的美容顾问和销售精英', '资深美容顾问',
'[{"course_id": 5, "order": 1, "is_required": true},
  {"course_id": 8, "order": 2, "is_required": true},
  {"course_id": 7, "order": 3, "is_required": true},
  {"course_id": 9, "order": 4, "is_required": true},
  {"course_id": 14, "order": 5, "is_required": false}]',
60, TRUE, 2),

('医美技师培养路径', '轻医美项目操作技师的专业培训路径', '医美技师',
'[{"course_id": 5, "order": 1, "is_required": true},
  {"course_id": 6, "order": 2, "is_required": true},
  {"course_id": 10, "order": 3, "is_required": true},
  {"course_id": 12, "order": 4, "is_required": true},
  {"course_id": 13, "order": 5, "is_required": false}]',
120, TRUE, 3),

('店长管理路径', '从员工到店长的管理能力提升路径', '美容店长',
'[{"course_id": 9, "order": 1, "is_required": true},
  {"course_id": 7, "order": 2, "is_required": true},
  {"course_id": 14, "order": 3, "is_required": true},
  {"course_id": 15, "order": 4, "is_required": true},
  {"course_id": 16, "order": 5, "is_required": true}]',
90, TRUE, 4);

-- ============================================
-- 十、模拟考试记录和陪练记录
-- ============================================

-- 插入一些考试记录
INSERT INTO exams (user_id, course_id, exam_name, question_count, total_score, pass_score, start_time, end_time, duration_minutes, score, is_passed, status) VALUES
(8, 5, '美容基础理论期末考试', 20, 100, 60, '2024-12-10 09:00:00', '2024-12-10 09:45:00', 60, 85, TRUE, 'submitted'),
(9, 6, '轻医美项目认证考试', 15, 100, 70, '2024-12-12 14:00:00', '2024-12-12 14:50:00', 60, 78, TRUE, 'submitted'),
(12, 7, '销售技巧考核', 10, 100, 60, '2024-12-15 10:00:00', '2024-12-15 10:30:00', 30, 92, TRUE, 'submitted'),
(13, 5, '皮肤生理学测试', 15, 100, 60, '2024-12-18 15:00:00', '2024-12-18 15:40:00', 45, 73, TRUE, 'submitted');

-- 插入一些陪练会话记录
INSERT INTO training_sessions (user_id, scene_id, start_time, end_time, duration_seconds, status, total_score, evaluation_result) VALUES
(8, 4, '2024-12-20 10:00:00', '2024-12-20 10:25:00', 1500, 'COMPLETED', 82,
'{"professionalism": 85, "communication": 80, "needs_analysis": 82, "solution_matching": 80}'),
(12, 5, '2024-12-21 14:30:00', '2024-12-21 14:50:00', 1200, 'COMPLETED', 88,
'{"accuracy": 90, "clarity": 88, "practicality": 85, "patience": 87}'),
(17, 6, '2024-12-22 09:00:00', '2024-12-22 09:20:00', 1200, 'COMPLETED', 75,
'{"empathy": 78, "problem_solving": 72, "communication": 75, "result": 75}'),
(20, 8, '2024-12-23 15:00:00', '2024-12-23 15:30:00', 1800, 'COMPLETED', 90,
'{"persuasion": 88, "product_knowledge": 92, "objection_handling": 90, "closing": 90}');

-- ============================================
-- 输出完成信息
-- ============================================

SELECT '美容机构模拟数据插入完成！' as message;
SELECT '新增用户数量：' as info, COUNT(*) as count FROM users WHERE id > 3;
SELECT '新增团队数量：' as info, COUNT(*) as count FROM teams WHERE id > 3;
SELECT '新增课程数量：' as info, COUNT(*) as count FROM courses WHERE id > 4;
SELECT '新增陪练场景：' as info, COUNT(*) as count FROM training_scenes WHERE id > 3;
