USE pickleball_pro;
-- password: Admin@123

INSERT INTO tournaments (name, slug, status, location, start_date, end_date, created_by)
VALUES ('Demo Pickleball Open', 'demo-pickleball-open', 'active', 'Visakhapatnam', '2026-03-20', '2026-03-22', 1);

INSERT INTO courts (tournament_id, name, sort_order) VALUES
(1, 'Center Court', 1),
(1, 'Court 2', 2);

INSERT INTO teams (tournament_id, name, short_name, seed_no) VALUES
(1, 'Warriors', 'WAR', 1),
(1, 'Titans', 'TIT', 2),
(1, 'Rockets', 'ROC', 3),
(1, 'Strikers', 'STR', 4);

INSERT INTO matches (tournament_id, court_id, match_no, stage, round_name, team1_id, team2_id, status, format_type, best_of, points_to_win, final_set_points, current_set_no, current_server_team_no, current_server_no, starting_server_team_no)
VALUES
(1, 1, 'M01', 'League', 'Round 1', 1, 2, 'live', 'doubles', 3, 11, 15, 1, 1, 1, 1),
(1, 2, 'M02', 'League', 'Round 1', 3, 4, 'ready', 'doubles', 3, 11, 15, 1, 2, 1, 2);

INSERT INTO match_sets (match_id, set_no, team1_score, team2_score, started_at)
VALUES
(1, 1, 6, 4, NOW()),
(2, 1, 0, 0, NOW());
