| 123456789101112131415161718192021222324252627282930313233 |
- -- ******************************************************************
- -- 表 kku_item_dismantle_rules 的创建SQL
- -- 对应的Model: App\Module\GameItems\Models\ItemDismantleRule
- -- 警告: 此文件由系统自动生成,禁止修改!
- -- ******************************************************************
- CREATE TABLE `kku_item_dismantle_rules` (
- `id` int NOT NULL AUTO_INCREMENT COMMENT '规则ID,主键',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '规则名称',
- `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '规则编码(唯一)',
- `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '规则描述',
- `item_id` int DEFAULT NULL COMMENT '物品ID,外键关联kku_item_items表',
- `category_id` int DEFAULT NULL COMMENT '分类ID,外键关联kku_item_categories表',
- `consume_group_id` int unsigned DEFAULT NULL COMMENT '消耗组ID',
- `reward_group_id` int unsigned DEFAULT NULL COMMENT '奖励组ID',
- `condition_group_id` int unsigned DEFAULT NULL COMMENT '条件组ID',
- `min_rarity` tinyint DEFAULT '1' COMMENT '最小适用稀有度',
- `max_rarity` tinyint DEFAULT '1' COMMENT '最大适用稀有度',
- `priority` int DEFAULT '0' COMMENT '规则优先级',
- `sort_order` int DEFAULT '0' COMMENT '排序权重',
- `is_active` tinyint DEFAULT '1' COMMENT '是否激活(0:否, 1:是)',
- `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
- `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE KEY `item_dismantle_rules_code_unique` (`code`) USING BTREE,
- KEY `idx_item_id` (`item_id`) USING BTREE,
- KEY `idx_category_id` (`category_id`) USING BTREE,
- KEY `idx_priority` (`priority`) USING BTREE,
- KEY `idx_consume_group_id` (`consume_group_id`) USING BTREE,
- KEY `idx_reward_group_id` (`reward_group_id`) USING BTREE,
- KEY `idx_condition_group_id` (`condition_group_id`) USING BTREE,
- KEY `idx_sort_order` (`sort_order`) USING BTREE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='物品分解规则(使用组系统)';
|