-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             12.12.0.7122
-- --------------------------------------------------------



-- Dumping database structure for fighter_game
CREATE DATABASE IF NOT EXISTS `fighter_game` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `fighter_game`;

-- Dumping structure for table fighter_game.scores
CREATE TABLE IF NOT EXISTS `scores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `username` varchar(32) NOT NULL,
  `level` tinyint(4) NOT NULL DEFAULT 1,
  `score` int(11) NOT NULL,
  `match_time_sec` int(11) NOT NULL DEFAULT 0,
  `result` enum('win','lose') NOT NULL DEFAULT 'win',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_score` (`score`),
  KEY `idx_created` (`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Dumping data for table fighter_game.scores: ~15 rows (approximately)
INSERT INTO `scores` (`id`, `user_id`, `username`, `level`, `score`, `match_time_sec`, `result`, `created_at`) VALUES
	(1, NULL, 'TEST_USER', 1, 123, 45, 'win', '2026-01-28 13:58:26'),
	(2, -1, 'guest', 1, 1038, 14, 'win', '2026-01-29 01:38:05'),
	(3, -1, 'guest', 1, 198, 15, 'lose', '2026-01-29 01:56:11'),
	(4, -1, 'guest', 1, 192, 16, 'lose', '2026-01-29 01:56:29'),
	(5, -1, 'guest', 1, 1106, 18, 'win', '2026-01-29 02:24:11'),
	(6, 0, 'guest', 1, 1106, 18, 'win', '2026-01-29 02:24:11'),
	(7, -1, 'guest', 1, 1030, 20, 'win', '2026-01-29 02:42:20'),
	(8, 0, 'guest', 1, 1030, 20, 'win', '2026-01-29 02:42:21'),
	(9, -1, 'guest', 1, 1129, 17, 'win', '2026-01-29 03:41:00'),
	(10, 0, 'guest', 1, 1129, 17, 'win', '2026-01-29 03:41:00'),
	(11, -1, 'guest', 1, 1215, 15, 'win', '2026-01-29 03:51:50'),
	(12, 0, 'guest', 1, 1066, 18, 'win', '2026-01-29 04:22:27'),
	(13, 1, 'lavaman4ik', 1, 1139, 17, 'win', '2026-01-29 04:37:42'),
	(14, 0, 'guest', 1, 1079, 17, 'win', '2026-01-29 04:54:09'),
	(15, 0, 'guest', 1, 1004, 12, 'win', '2026-01-29 04:54:32'),
	(16, 0, 'guest', 1, 1008, 14, 'win', '2026-01-29 05:22:39');

