item_dismantle_rules.sql 1.2 KB

12345678910111213141516171819202122
  1. -- ******************************************************************
  2. -- 表 kku_item_dismantle_rules 的创建SQL
  3. -- 对应的Model: App\Module\GameItems\Models\ItemDismantleRule
  4. -- 警告: 此文件由系统自动生成,禁止手动修改!
  5. -- ******************************************************************
  6. DROP TABLE IF EXISTS `kku_item_dismantle_rules`;
  7. CREATE TABLE `kku_item_dismantle_rules` (
  8. `id` int NOT NULL AUTO_INCREMENT COMMENT '规则ID,主键',
  9. `item_id` int DEFAULT NULL COMMENT '物品ID,外键关联kku_item_items表',
  10. `category_id` int DEFAULT NULL COMMENT '分类ID,外键关联kku_item_categories表',
  11. `min_rarity` tinyint DEFAULT '1' COMMENT '最小适用稀有度',
  12. `max_rarity` tinyint DEFAULT '1' COMMENT '最大适用稀有度',
  13. `priority` int DEFAULT '0' COMMENT '规则优先级',
  14. `is_active` tinyint DEFAULT '1' COMMENT '是否激活(0:否, 1:是)',
  15. `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  16. `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  17. PRIMARY KEY (`id`),
  18. KEY `idx_item_id` (`item_id`),
  19. KEY `idx_category_id` (`category_id`),
  20. KEY `idx_priority` (`priority`)
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='物品分解规则表';