item_chest_open_costs.sql 1.3 KB

12345678910111213141516171819
  1. -- ******************************************************************
  2. -- 表 kku_item_chest_open_costs 的创建SQL
  3. -- 对应的Model: App\Module\GameItems\Models\ItemChestOpenCost
  4. -- 警告: 此文件由系统自动生成,禁止修改!
  5. -- ******************************************************************
  6. CREATE TABLE `kku_item_chest_open_costs` (
  7. `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID,主键',
  8. `chest_id` int unsigned NOT NULL COMMENT '宝箱ID,外键关联item_items表',
  9. `cost_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '消耗类型(1:物品, 2:货币, 3:其他资源)',
  10. `cost_id` int unsigned NOT NULL COMMENT '消耗的物品/货币/资源ID',
  11. `cost_quantity` int unsigned NOT NULL DEFAULT '1' COMMENT '消耗数量',
  12. `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否激活(0:否, 1:是)',
  13. `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  14. `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  15. PRIMARY KEY (`id`) USING BTREE,
  16. KEY `idx_chest_id` (`chest_id`) USING BTREE,
  17. KEY `idx_cost_type_cost_id` (`cost_type`,`cost_id`) USING BTREE
  18. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='宝箱开启消耗配置表';