-- 一键导入普拉提动作分类与动作（MySQL 8+）
-- 说明：表由 Sequelize 同步创建（t_exercise_categories / t_exercises）
-- 若要幂等导入，使用 INSERT ... ON DUPLICATE KEY UPDATE

USE `db-plates`;

START TRANSACTION;

-- 分类
INSERT INTO `t_exercise_categories` (`key`, `name`, `sort_order`, `created_at`, `updated_at`) VALUES
  ('core', '核心与腹部', 0, NOW(), NOW()),
  ('spine_posterior_chain', '脊柱与后链', 1, NOW(), NOW()),
  ('lateral_hip', '侧链与髋', 2, NOW(), NOW()),
  ('balance_support', '平衡与支撑', 3, NOW(), NOW()),
  ('advanced_control', '进阶控制', 4, NOW(), NOW()),
  ('mobility_stretch', '柔韧与拉伸', 5, NOW(), NOW())
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`), `sort_order` = VALUES(`sort_order`), `updated_at` = NOW();

-- 动作
INSERT INTO `t_exercises` (`key`, `name`, `description`, `category_key`, `category_name`, `sort_order`, `created_at`, `updated_at`) VALUES
  ('hundred', '百次拍击 (The Hundred)', '仰卧桌面位，小幅摆臂协同吸呼，核心激活。', 'core', '核心与腹部', 0, NOW(), NOW()),
  ('single_leg_stretch', '单腿伸展 (Single Leg Stretch)', '交替伸直一条腿，另一腿屈膝抱向胸口，稳定骨盆。', 'core', '核心与腹部', 1, NOW(), NOW()),
  ('double_leg_stretch', '双腿伸展 (Double Leg Stretch)', '双臂双腿同时伸直/收回，呼吸控制，核心稳定。', 'core', '核心与腹部', 2, NOW(), NOW()),
  ('criss_cross', '扭转卷腹 (Criss Cross)', '肘碰对侧膝，腹斜肌发力与呼吸配合。', 'core', '核心与腹部', 3, NOW(), NOW()),
  ('single_straight_leg', '单腿直剪 (Scissors)', '交替拉长上抬直腿，控制下放，避免耸肩。', 'core', '核心与腹部', 4, NOW(), NOW()),
  ('double_straight_leg', '双腿抬降 (Double Straight Leg Lower Lift)', '双腿并拢抬降，腹直肌抗伸展。', 'core', '核心与腹部', 5, NOW(), NOW()),
  ('spine_stretch_forward', '脊柱前伸 (Spine Stretch Forward)', '坐姿脊柱分节前伸，强调轴向延展与呼吸。', 'core', '核心与腹部', 6, NOW(), NOW()),
  ('roll_up', '卷起 (Roll Up)', '仰卧分节卷起到坐，前屈后还原，控制节律。', 'core', '核心与腹部', 7, NOW(), NOW()),
  ('rolling_like_a_ball', '小球滚动 (Rolling Like a Ball)', '抱膝蜷成球，控制滚动回正，核心稳定。', 'core', '核心与腹部', 8, NOW(), NOW()),
  ('teaser', '船式 (Teaser)', 'V字平衡，腿躯干对抗重力与摆动。', 'core', '核心与腹部', 9, NOW(), NOW()),

  ('swan', '天鹅式 (Swan)', '俯卧伸展胸椎，后链发力，延展不挤压。', 'spine_posterior_chain', '脊柱与后链', 10, NOW(), NOW()),
  ('swan_dive', '天鹅下潜 (Swan Dive)', '在Swan基础上前后摆动，弹性控制。', 'spine_posterior_chain', '脊柱与后链', 11, NOW(), NOW()),
  ('swimming', '游泳式 (Swimming)', '俯卧交替抬对侧上肢与下肢，脊柱中立。', 'spine_posterior_chain', '脊柱与后链', 12, NOW(), NOW()),
  ('shoulder_bridge', '肩桥 (Shoulder Bridge)', '仰卧卷尾抬盆，臀腿后侧力量与脊柱分节。', 'spine_posterior_chain', '脊柱与后链', 13, NOW(), NOW()),
  ('spine_twist', '脊柱扭转 (Spine Twist)', '坐姿轴向延展上的控制旋转。', 'spine_posterior_chain', '脊柱与后链', 14, NOW(), NOW()),
  ('saw', '锯式 (Saw)', '坐姿分腿，旋转前屈触对侧脚尖。', 'spine_posterior_chain', '脊柱与后链', 15, NOW(), NOW()),

  ('side_kick_front_back', '侧踢腿 前后摆 (Side Kick Front/Back)', '侧卧，髋稳定，腿前后摆动。', 'lateral_hip', '侧链与髋', 16, NOW(), NOW()),
  ('side_kick_up_down', '侧踢腿 上下 (Side Kick Up/Down)', '侧卧，上侧腿上抬下放，控制不耸肩。', 'lateral_hip', '侧链与髋', 17, NOW(), NOW()),
  ('side_leg_lift', '侧抬腿 (Side Leg Lift)', '侧卧抬腿，髋稳定，中臀肌激活。', 'lateral_hip', '侧链与髋', 18, NOW(), NOW()),
  ('clam', '蛤蜊式 (Clam)', '侧卧屈髋屈膝，抬起上侧膝，臀中刺激。', 'lateral_hip', '侧链与髋', 19, NOW(), NOW()),
  ('mermaid', '美人鱼 (Mermaid)', '坐姿侧屈拉伸，改善侧链柔韧。', 'lateral_hip', '侧链与髋', 20, NOW(), NOW()),

  ('plank', '平板支撑 (Plank)', '掌/前臂支撑，身体成一直线，核心稳定。', 'balance_support', '平衡与支撑', 21, NOW(), NOW()),
  ('side_plank', '侧板支撑 (Side Plank)', '单侧支撑，侧链与肩带稳定。', 'balance_support', '平衡与支撑', 22, NOW(), NOW()),
  ('push_up', '俯卧撑 (Push Up)', '胸肩臂与核心协同的推举支撑。', 'balance_support', '平衡与支撑', 23, NOW(), NOW()),
  ('leg_pull_front', '前拉腿 (Leg Pull Front)', '俯撑抬腿，后链与肩带控制。', 'balance_support', '平衡与支撑', 24, NOW(), NOW()),
  ('leg_pull_back', '后拉腿 (Leg Pull Back)', '仰撑抬腿，后链与肩带控制。', 'balance_support', '平衡与支撑', 25, NOW(), NOW()),

  ('jackknife', '折刀 (Jackknife)', '仰卧抬腿过头后折刀上推，核心与控制。', 'advanced_control', '进阶控制', 26, NOW(), NOW()),
  ('open_leg_rocker', '开腿摇滚 (Open Leg Rocker)', '开腿V坐平衡，来回滚动。', 'advanced_control', '进阶控制', 27, NOW(), NOW()),
  ('corkscrew', '开瓶器 (Corkscrew)', '躯干稳定下的双腿画圈，控制髋与核心。', 'advanced_control', '进阶控制', 28, NOW(), NOW()),
  ('boomerang', '回旋镖 (Boomerang)', '融合Roll Over/Teaser的串联流畅控制。', 'advanced_control', '进阶控制', 29, NOW(), NOW()),
  ('control_balance', '控制平衡 (Control Balance)', '过头位下的单腿抬降与控制。', 'advanced_control', '进阶控制', 30, NOW(), NOW()),
  ('neck_pull', '抱颈卷起 (Neck Pull)', '更具挑战的卷起，背侧链参与更高。', 'advanced_control', '进阶控制', 31, NOW(), NOW()),
  ('roll_over', '翻滚过头 (Roll Over)', '仰卧双腿过头落地，脊柱分节控制。', 'advanced_control', '进阶控制', 32, NOW(), NOW()),

  ('cat_cow', '猫牛 (Cat-Cow)', '四点支撑的屈伸热身/整理放松。', 'mobility_stretch', '柔韧与拉伸', 33, NOW(), NOW()),
  ('hamstring_stretch', '腘绳肌拉伸', '仰卧或坐姿，拉伸大腿后侧。', 'mobility_stretch', '柔韧与拉伸', 34, NOW(), NOW()),
  ('hip_flexor_stretch', '髋屈肌拉伸', '弓步位，前髋前侧拉伸。', 'mobility_stretch', '柔韧与拉伸', 35, NOW(), NOW()),
  ('thoracic_extension', '胸椎伸展', '泡沫轴/垫上胸椎延展放松。', 'mobility_stretch', '柔韧与拉伸', 36, NOW(), NOW())
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`), `description` = VALUES(`description`), `category_key` = VALUES(`category_key`), `category_name` = VALUES(`category_name`), `sort_order` = VALUES(`sort_order`), `updated_at` = NOW();

COMMIT;


