-- Workout 1: John's Push Day
INSERT INTO workouts (id, user_id, name, notes, workout_date) VALUES
    ('750e8400-e29b-41d4-a716-446655440001', '650e8400-e29b-41d4-a716-446655440001', 'Push Day', 'Felt strong today', '2024-10-01 09:00:00');

-- Workout exercises for Push Day
INSERT INTO workout_exercises (id, workout_id, exercise_id, order_index, notes) VALUES
    ('850e8400-e29b-41d4-a716-446655440001', '750e8400-e29b-41d4-a716-446655440001', 
     (SELECT id FROM exercises WHERE name = 'Barbell Bench Press'), 1, 'Felt good on chest'),
    ('850e8400-e29b-41d4-a716-446655440002', '750e8400-e29b-41d4-a716-446655440001', 
     (SELECT id FROM exercises WHERE name = 'Overhead Press'), 2, NULL),
    ('850e8400-e29b-41d4-a716-446655440003', '750e8400-e29b-41d4-a716-446655440001', 
     (SELECT id FROM exercises WHERE name = 'Tricep Pushdown'), 3, 'Burned out on last set');

-- Sets for Bench Press
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440001', 1, 10, 135.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440001', 2, 8, 185.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440001', 3, 6, 205.0, 'lbs', 8),
    ('850e8400-e29b-41d4-a716-446655440001', 4, 8, 185.0, 'lbs', 9);

-- Sets for Overhead Press
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440002', 1, 10, 95.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440002', 2, 8, 115.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440002', 3, 6, 125.0, 'lbs', 8);

-- Sets for Tricep Pushdown
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440003', 1, 12, 50.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440003', 2, 10, 60.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440003', 3, 8, 70.0, 'lbs', 9);

-- Workout 2: Jane's Leg Day
INSERT INTO workouts (id, user_id, name, notes, workout_date) VALUES
    ('750e8400-e29b-41d4-a716-446655440002', '650e8400-e29b-41d4-a716-446655440002', 'Leg Day', 'Tough session but got through it', '2024-10-02 10:30:00');

-- Workout exercises for Leg Day
INSERT INTO workout_exercises (id, workout_id, exercise_id, order_index) VALUES
    ('850e8400-e29b-41d4-a716-446655440004', '750e8400-e29b-41d4-a716-446655440002', 
     (SELECT id FROM exercises WHERE name = 'Barbell Back Squat'), 1),
    ('850e8400-e29b-41d4-a716-446655440005', '750e8400-e29b-41d4-a716-446655440002', 
     (SELECT id FROM exercises WHERE name = 'Romanian Deadlift'), 2),
    ('850e8400-e29b-41d4-a716-446655440006', '750e8400-e29b-41d4-a716-446655440002', 
     (SELECT id FROM exercises WHERE name = 'Walking Lunge'), 3);

-- Sets for Squat
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440004', 1, 8, 135.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440004', 2, 6, 155.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440004', 3, 5, 175.0, 'lbs', 8),
    ('850e8400-e29b-41d4-a716-446655440004', 4, 6, 155.0, 'lbs', 9);

-- Sets for Romanian Deadlift
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440005', 1, 10, 95.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440005', 2, 10, 115.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440005', 3, 8, 135.0, 'lbs', 8);

-- Sets for Walking Lunge
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440006', 1, 20, 25.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440006', 2, 20, 25.0, 'lbs', 8),
    ('850e8400-e29b-41d4-a716-446655440006', 3, 16, 30.0, 'lbs', 9);

-- Workout 3: Mike's Cardio Session
INSERT INTO workouts (id, user_id, name, notes, workout_date) VALUES
    ('750e8400-e29b-41d4-a716-446655440003', '650e8400-e29b-41d4-a716-446655440003', 'Morning Run', 'Beautiful weather', '2024-10-03 06:00:00');

INSERT INTO workout_exercises (id, workout_id, exercise_id, order_index) VALUES
    ('850e8400-e29b-41d4-a716-446655440007', '750e8400-e29b-41d4-a716-446655440003', 
     (SELECT id FROM exercises WHERE name = 'Running'), 1);

-- Cardio set with distance and duration
INSERT INTO exercise_sets (workout_exercise_id, set_number, duration_seconds, distance, distance_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440007', 1, 1800, 3.1, 'miles', 6);

-- Workout 4: Sarah's Pull Day
INSERT INTO workouts (id, user_id, name, notes, workout_date) VALUES
    ('750e8400-e29b-41d4-a716-446655440004', '650e8400-e29b-41d4-a716-446655440004', 'Pull Day', 'New PR on deadlift!', '2024-10-04 14:00:00');

INSERT INTO workout_exercises (id, workout_id, exercise_id, order_index, notes) VALUES
    ('850e8400-e29b-41d4-a716-446655440008', '750e8400-e29b-41d4-a716-446655440004', 
     (SELECT id FROM exercises WHERE name = 'Barbell Deadlift'), 1, 'PR on third set!'),
    ('850e8400-e29b-41d4-a716-446655440009', '750e8400-e29b-41d4-a716-446655440004', 
     (SELECT id FROM exercises WHERE name = 'Pull-ups'), 2, NULL),
    ('850e8400-e29b-41d4-a716-446655440010', '750e8400-e29b-41d4-a716-446655440004', 
     (SELECT id FROM exercises WHERE name = 'Barbell Row'), 3, NULL);

-- Sets for Deadlift
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440008', 1, 5, 185.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440008', 2, 3, 225.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440008', 3, 1, 255.0, 'lbs', 9),
    ('850e8400-e29b-41d4-a716-446655440008', 4, 5, 205.0, 'lbs', 8);

-- Sets for Pull-ups (bodyweight)
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440009', 1, 10, 7),
    ('850e8400-e29b-41d4-a716-446655440009', 2, 8, 8),
    ('850e8400-e29b-41d4-a716-446655440009', 3, 6, 9);

-- Sets for Barbell Row
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440010', 1, 10, 95.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440010', 2, 8, 115.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440010', 3, 8, 115.0, 'lbs', 8);

-- Workout 5: John's Second Workout - Full Body
INSERT INTO workouts (id, user_id, name, notes, workout_date) VALUES
    ('750e8400-e29b-41d4-a716-446655440005', '650e8400-e29b-41d4-a716-446655440001', 'Full Body', 'Quick session before work', '2024-10-05 07:00:00');

INSERT INTO workout_exercises (id, workout_id, exercise_id, order_index) VALUES
    ('850e8400-e29b-41d4-a716-446655440011', '750e8400-e29b-41d4-a716-446655440005', 
     (SELECT id FROM exercises WHERE name = 'Front Squat'), 1),
    ('850e8400-e29b-41d4-a716-446655440012', '750e8400-e29b-41d4-a716-446655440005', 
     (SELECT id FROM exercises WHERE name = 'Dumbbell Bench Press'), 2),
    ('850e8400-e29b-41d4-a716-446655440013', '750e8400-e29b-41d4-a716-446655440005', 
     (SELECT id FROM exercises WHERE name = 'Lat Pulldown'), 3);

-- Sets for Front Squat
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440011', 1, 8, 95.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440011', 2, 8, 115.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440011', 3, 6, 135.0, 'lbs', 8);

-- Sets for Dumbbell Bench Press
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion, notes) VALUES
    ('850e8400-e29b-41d4-a716-446655440012', 1, 10, 50.0, 'lbs', 6, 'Per dumbbell'),
    ('850e8400-e29b-41d4-a716-446655440012', 2, 8, 60.0, 'lbs', 7, 'Per dumbbell'),
    ('850e8400-e29b-41d4-a716-446655440012', 3, 8, 60.0, 'lbs', 8, 'Per dumbbell');

-- Sets for Lat Pulldown
INSERT INTO exercise_sets (workout_exercise_id, set_number, reps, weight, weight_unit, rate_perceived_exertion) VALUES
    ('850e8400-e29b-41d4-a716-446655440013', 1, 12, 100.0, 'lbs', 6),
    ('850e8400-e29b-41d4-a716-446655440013', 2, 10, 120.0, 'lbs', 7),
    ('850e8400-e29b-41d4-a716-446655440013', 3, 8, 140.0, 'lbs', 8);
