-- ****************************************************************** -- 表 kku_item_recipes 的创建SQL -- 对应的Model: App\Module\GameItems\Models\ItemRecipe -- 警告: 此文件由系统自动生成,禁止修改! -- ****************************************************************** CREATE TABLE `kku_item_recipes` ( `id` int(11) 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 '配方描述', `consume_group_id` int(10) unsigned DEFAULT NULL COMMENT '消耗组ID', `reward_group_id` int(10) unsigned DEFAULT NULL COMMENT '奖励组ID', `condition_group_id` int(10) unsigned DEFAULT NULL COMMENT '条件组ID', `display_attributes` json DEFAULT NULL COMMENT '展示属性,以JSON格式存储键值对,用于界面展示和描述的属性', `success_rate` decimal(5,2) DEFAULT '100.00' COMMENT '成功率(0-100之间的小数,100 = 100%)', `cooldown_seconds` int(11) DEFAULT '0' COMMENT '冷却时间(秒)', `category_id` int(11) DEFAULT NULL COMMENT '配方分类ID', `sort_order` int(11) DEFAULT '0' COMMENT '排序权重', `is_active` tinyint(4) 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_recipes_code_unique` (`code`) USING BTREE, KEY `idx_category` (`category_id`) 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 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='物品合成配方(使用组系统)';