item_chest_configs.sql 1.5 KB

12345678910111213141516171819202122
  1. -- ******************************************************************
  2. -- 表 kku_item_chest_configs 的创建SQL
  3. -- 对应的Model: App\Module\GameItems\Models\ItemChestConfig
  4. -- 警告: 此文件由系统自动生成,禁止修改!
  5. -- ******************************************************************
  6. CREATE TABLE `kku_item_chest_configs` (
  7. `id` int NOT NULL AUTO_INCREMENT COMMENT '记录ID,主键',
  8. `item_id` int NOT NULL COMMENT '宝箱物品ID,外键关联kku_item_items表',
  9. `consume_group_id` int DEFAULT NULL COMMENT '消耗组ID,外键关联kku_game_consume_groups表(可为空)',
  10. `reward_group_id` int NOT NULL COMMENT '奖励组ID,外键关联kku_game_reward_groups表',
  11. `condition_group_id` int DEFAULT NULL COMMENT '条件组ID,外键关联kku_game_condition_groups表(可为空)',
  12. `is_active` tinyint DEFAULT '1' COMMENT '是否激活(0:否, 1:是)',
  13. `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  14. `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  15. PRIMARY KEY (`id`) USING BTREE,
  16. UNIQUE KEY `idx_item_id` (`item_id`) USING BTREE COMMENT '每个宝箱物品只能有一个配置',
  17. KEY `idx_consume_group` (`consume_group_id`) USING BTREE,
  18. KEY `idx_reward_group` (`reward_group_id`) USING BTREE,
  19. KEY `idx_condition_group` (`condition_group_id`) USING BTREE,
  20. KEY `idx_is_active` (`is_active`) USING BTREE
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='宝箱配置表';