| 123456789101112131415161718 |
- -- 表 kku_pet_battle_teams 的创建SQL
- -- 自动生成于 2025-04-30 03:00:13
- DROP TABLE IF EXISTS `kku_pet_battle_teams`;
- CREATE TABLE `kku_pet_battle_teams` (
- `id` int unsigned NOT NULL AUTO_INCREMENT,
- `season_id` int unsigned NOT NULL COMMENT '赛季ID',
- `name` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '队伍名称',
- `leader_id` bigint unsigned NOT NULL COMMENT '队长用户ID',
- `total_power` int unsigned NOT NULL DEFAULT '0' COMMENT '队伍总战力',
- `member_count` tinyint unsigned DEFAULT '0' COMMENT '成员数量',
- `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
- `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- KEY `idx_season` (`season_id`),
- KEY `idx_leader` (`leader_id`),
- CONSTRAINT `kku_pet_battle_teams_ibfk_1` FOREIGN KEY (`season_id`) REFERENCES `kku_pet_battle_seasons` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='争霸赛队伍';
|