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