-- Sample Team / Player / Tournament data for point3 project
-- Import after database.sql
USE softball_broadcast_pro;


-- Clean sample data only. Remove these DELETE lines if you already have real data.
DELETE FROM team_players;
DELETE FROM tournament_matches;
DELETE FROM tournaments;
DELETE FROM player_career_stats;
DELETE FROM players;
DELETE FROM teams;

ALTER TABLE team_players AUTO_INCREMENT = 1;
ALTER TABLE tournament_matches AUTO_INCREMENT = 1;
ALTER TABLE tournaments AUTO_INCREMENT = 1;
ALTER TABLE player_career_stats AUTO_INCREMENT = 1;
ALTER TABLE players AUTO_INCREMENT = 1;
ALTER TABLE teams AUTO_INCREMENT = 1;

-- Teams
INSERT INTO teams (id, team_name, short_name, logo, team_color, contact_number) VALUES
(1, 'Osan Lions', 'OSL', '', '#f59e0b', '010-1000-0001'),
(2, 'Seoul Titans', 'SET', '', '#2563eb', '010-1000-0002'),
(3, 'Suwon Kings', 'SWK', '', '#dc2626', '010-1000-0003'),
(4, 'Pyeongtaek Warriors', 'PTW', '', '#16a34a', '010-1000-0004'),
(5, 'Ansan Riders', 'ASR', '', '#7c3aed', '010-1000-0005'),
(6, 'Incheon Strikers', 'ICS', '', '#0891b2', '010-1000-0006');

-- Players: 12 players per team
INSERT INTO players (id, player_name, short_name, role, batting_style, bowling_style, jersey_number, photo, notes) VALUES
(1,'Nuwan Perera','Nuwan','All Rounder','Right Hand Bat','Right Arm Medium','07','','Sample player'),
(2,'Kasun Silva','Kasun','Batsman','Right Hand Bat','','18','','Sample player'),
(3,'Tharindu Jay','Tharindu','Bowler','Left Hand Bat','Right Arm Fast','11','','Sample player'),
(4,'Lahiru Madushan','Lahiru','Wicket Keeper','Right Hand Bat','','23','','Sample player'),
(5,'Dinesh Kumara','Dinesh','Batsman','Left Hand Bat','','45','','Sample player'),
(6,'Ruwan Fernando','Ruwan','Bowler','Right Hand Bat','Left Arm Spin','99','','Sample player'),
(7,'Isuru Chanaka','Isuru','All Rounder','Right Hand Bat','Off Spin','10','','Sample player'),
(8,'Malith Sandaruwan','Malith','Batsman','Right Hand Bat','','33','','Sample player'),
(9,'Chamika Dilshan','Chamika','Bowler','Right Hand Bat','Right Arm Medium','21','','Sample player'),
(10,'Supun Lakshan','Supun','All Rounder','Left Hand Bat','Left Arm Medium','55','','Sample player'),
(11,'Ayesh Randika','Ayesh','Bowler','Right Hand Bat','Leg Spin','77','','Sample player'),
(12,'Pradeep Madawa','Pradeep','Batsman','Right Hand Bat','','08','','Sample player'),

(13,'Amila Rodrigo','Amila','All Rounder','Right Hand Bat','Right Arm Medium','12','','Sample player'),
(14,'Sahan Dias','Sahan','Batsman','Left Hand Bat','','19','','Sample player'),
(15,'Janith Peiris','Janith','Bowler','Right Hand Bat','Right Arm Fast','05','','Sample player'),
(16,'Kavindu Raj','Kavindu','Wicket Keeper','Right Hand Bat','','31','','Sample player'),
(17,'Roshan Mendis','Roshan','Batsman','Right Hand Bat','','44','','Sample player'),
(18,'Dinuka Sampath','Dinuka','Bowler','Left Hand Bat','Left Arm Spin','66','','Sample player'),
(19,'Milan Suranga','Milan','All Rounder','Right Hand Bat','Off Spin','09','','Sample player'),
(20,'Hasitha Prabath','Hasitha','Batsman','Right Hand Bat','','26','','Sample player'),
(21,'Kushan Vimukthi','Kushan','Bowler','Right Hand Bat','Right Arm Medium','88','','Sample player'),
(22,'Nadeera Sandun','Nadeera','All Rounder','Left Hand Bat','Left Arm Medium','17','','Sample player'),
(23,'Gayan Chathura','Gayan','Bowler','Right Hand Bat','Leg Spin','70','','Sample player'),
(24,'Shehan Lakmal','Shehan','Batsman','Right Hand Bat','','03','','Sample player'),

(25,'Ravindu Gunasekara','Ravindu','All Rounder','Right Hand Bat','Right Arm Medium','14','','Sample player'),
(26,'Madhawa Priyantha','Madhawa','Batsman','Left Hand Bat','','22','','Sample player'),
(27,'Sajith Maduranga','Sajith','Bowler','Right Hand Bat','Right Arm Fast','32','','Sample player'),
(28,'Buddhika Nirmal','Buddhika','Wicket Keeper','Right Hand Bat','','01','','Sample player'),
(29,'Asanka Lakruwan','Asanka','Batsman','Right Hand Bat','','29','','Sample player'),
(30,'Nimesh Akalanka','Nimesh','Bowler','Left Hand Bat','Left Arm Spin','64','','Sample player'),
(31,'Dulaj Pramod','Dulaj','All Rounder','Right Hand Bat','Off Spin','24','','Sample player'),
(32,'Avishka Sanjeewa','Avishka','Batsman','Right Hand Bat','','35','','Sample player'),
(33,'Shanaka Ruwanjith','Shanaka','Bowler','Right Hand Bat','Right Arm Medium','41','','Sample player'),
(34,'Pathum Dilanka','Pathum','All Rounder','Left Hand Bat','Left Arm Medium','16','','Sample player'),
(35,'Sachin Eranga','Sachin','Bowler','Right Hand Bat','Leg Spin','69','','Sample player'),
(36,'Charith Sandeep','Charith','Batsman','Right Hand Bat','','28','','Sample player'),

(37,'Dhanushka Lakmal','Dhanushka','All Rounder','Right Hand Bat','Right Arm Medium','04','','Sample player'),
(38,'Heshan Kavinda','Heshan','Batsman','Left Hand Bat','','20','','Sample player'),
(39,'Sameera Bandara','Sameera','Bowler','Right Hand Bat','Right Arm Fast','36','','Sample player'),
(40,'Udara Prasad','Udara','Wicket Keeper','Right Hand Bat','','06','','Sample player'),
(41,'Ramesh Chathuranga','Ramesh','Batsman','Right Hand Bat','','42','','Sample player'),
(42,'Dilshan Madushanka','Dilshan','Bowler','Left Hand Bat','Left Arm Spin','67','','Sample player'),
(43,'Suresh Priyankara','Suresh','All Rounder','Right Hand Bat','Off Spin','15','','Sample player'),
(44,'Manoj Fernando','Manoj','Batsman','Right Hand Bat','','37','','Sample player'),
(45,'Sandaruwan Kumara','Sandaruwan','Bowler','Right Hand Bat','Right Arm Medium','47','','Sample player'),
(46,'Ruchira Sampath','Ruchira','All Rounder','Left Hand Bat','Left Arm Medium','25','','Sample player'),
(47,'Pramod Hashan','Pramod','Bowler','Right Hand Bat','Leg Spin','71','','Sample player'),
(48,'Dineth Lasantha','Dineth','Batsman','Right Hand Bat','','30','','Sample player'),

(49,'Akila Dhananjaya','Akila','All Rounder','Right Hand Bat','Right Arm Medium','13','','Sample player'),
(50,'Lasantha Kumara','Lasantha','Batsman','Left Hand Bat','','27','','Sample player'),
(51,'Niroshan Dilan','Niroshan','Bowler','Right Hand Bat','Right Arm Fast','38','','Sample player'),
(52,'Sampath Wijesinghe','Sampath','Wicket Keeper','Right Hand Bat','','02','','Sample player'),
(53,'Harsha Lakshan','Harsha','Batsman','Right Hand Bat','','43','','Sample player'),
(54,'Viraj Maduranga','Viraj','Bowler','Left Hand Bat','Left Arm Spin','68','','Sample player'),
(55,'Sachitha Ruwan','Sachitha','All Rounder','Right Hand Bat','Off Spin','34','','Sample player'),
(56,'Dulshan Madawa','Dulshan','Batsman','Right Hand Bat','','39','','Sample player'),
(57,'Chamara Prasad','Chamara','Bowler','Right Hand Bat','Right Arm Medium','48','','Sample player'),
(58,'Kumara Nuwan','Kumara','All Rounder','Left Hand Bat','Left Arm Medium','57','','Sample player'),
(59,'Thilina Sampath','Thilina','Bowler','Right Hand Bat','Leg Spin','72','','Sample player'),
(60,'Sanka Pradeep','Sanka','Batsman','Right Hand Bat','','40','','Sample player'),

(61,'Ranjith Perera','Ranjith','All Rounder','Right Hand Bat','Right Arm Medium','52','','Sample player'),
(62,'Mahesh Silva','Mahesh','Batsman','Left Hand Bat','','53','','Sample player'),
(63,'Lalith Jayasuriya','Lalith','Bowler','Right Hand Bat','Right Arm Fast','54','','Sample player'),
(64,'Kamal Priyadarshana','Kamal','Wicket Keeper','Right Hand Bat','','56','','Sample player'),
(65,'Sujeewa Chandana','Sujeewa','Batsman','Right Hand Bat','','58','','Sample player'),
(66,'Anuradha Kumara','Anuradha','Bowler','Left Hand Bat','Left Arm Spin','59','','Sample player'),
(67,'Prasad Eranda','Prasad','All Rounder','Right Hand Bat','Off Spin','60','','Sample player'),
(68,'Madushan Ishan','Madushan','Batsman','Right Hand Bat','','61','','Sample player'),
(69,'Kanchana Dilan','Kanchana','Bowler','Right Hand Bat','Right Arm Medium','62','','Sample player'),
(70,'Sampath Dilruk','Dilruk','All Rounder','Left Hand Bat','Left Arm Medium','63','','Sample player'),
(71,'Chathura Nuwan','Chathura','Bowler','Right Hand Bat','Leg Spin','65','','Sample player'),
(72,'Nalin Pradeep','Nalin','Batsman','Right Hand Bat','','73','','Sample player');

-- Assign players to teams
INSERT INTO team_players (team_id, player_id, status) VALUES
(1,1,'active'),(1,2,'active'),(1,3,'active'),(1,4,'active'),(1,5,'active'),(1,6,'active'),(1,7,'active'),(1,8,'active'),(1,9,'active'),(1,10,'active'),(1,11,'active'),(1,12,'active'),
(2,13,'active'),(2,14,'active'),(2,15,'active'),(2,16,'active'),(2,17,'active'),(2,18,'active'),(2,19,'active'),(2,20,'active'),(2,21,'active'),(2,22,'active'),(2,23,'active'),(2,24,'active'),
(3,25,'active'),(3,26,'active'),(3,27,'active'),(3,28,'active'),(3,29,'active'),(3,30,'active'),(3,31,'active'),(3,32,'active'),(3,33,'active'),(3,34,'active'),(3,35,'active'),(3,36,'active'),
(4,37,'active'),(4,38,'active'),(4,39,'active'),(4,40,'active'),(4,41,'active'),(4,42,'active'),(4,43,'active'),(4,44,'active'),(4,45,'active'),(4,46,'active'),(4,47,'active'),(4,48,'active'),
(5,49,'active'),(5,50,'active'),(5,51,'active'),(5,52,'active'),(5,53,'active'),(5,54,'active'),(5,55,'active'),(5,56,'active'),(5,57,'active'),(5,58,'active'),(5,59,'active'),(5,60,'active'),
(6,61,'active'),(6,62,'active'),(6,63,'active'),(6,64,'active'),(6,65,'active'),(6,66,'active'),(6,67,'active'),(6,68,'active'),(6,69,'active'),(6,70,'active'),(6,71,'active'),(6,72,'active');

-- Tournament
INSERT INTO tournaments (id, tournament_name, location, logo, status) VALUES
(1, 'Korea Softball Super League 2026', 'Osan Stadium', '', 'active');

-- Sample matches
INSERT INTO tournament_matches
(id, tournament_id, match_title, team_a_id, team_b_id, batting_team_id, bowling_team_id, striker_id, non_striker_id, opening_bowler_id, current_striker_id, current_non_striker_id, current_bowler_id, overs_per_innings, balls_per_over, match_order, innings_no, innings_completed, match_status)
VALUES
(1,1,'Match 01 - Osan Lions vs Seoul Titans',1,2,1,2,1,2,15,1,2,15,5,6,1,1,0,'scheduled'),
(2,1,'Match 02 - Suwon Kings vs Pyeongtaek Warriors',3,4,3,4,25,26,39,25,26,39,5,6,2,1,0,'scheduled'),
(3,1,'Match 03 - Ansan Riders vs Incheon Strikers',5,6,5,6,49,50,63,49,50,63,5,6,3,1,0,'scheduled'),
(4,1,'Match 04 - Seoul Titans vs Suwon Kings',2,3,2,3,13,14,27,13,14,27,5,6,4,1,0,'scheduled'),
(5,1,'Semi Final 01',1,4,1,4,1,2,39,1,2,39,5,6,5,1,0,'scheduled'),
(6,1,'Final',1,5,1,5,1,2,51,1,2,51,5,6,6,1,0,'scheduled');

-- Optional starter career stats
INSERT INTO player_career_stats (player_id, matches, innings, runs, balls, fours, sixes, highest_score, wickets, overs, runs_conceded, strike_rate, economy)
SELECT id, 0, 0, 0, 0, 0, 0, 0, 0, 0.0, 0, 0.00, 0.00 FROM players;

