-- ******************************************************************
-- 表 kku_farm_seed_outputs 的创建SQL
-- 对应的Model: App\Module\Farm\Models\FarmSeedOutput
-- 警告: 此文件由系统自动生成，禁止修改！
-- ******************************************************************

CREATE TABLE `kku_farm_seed_outputs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `seed_id` bigint(20) unsigned NOT NULL COMMENT '种子ID',
  `item_id` bigint(20) unsigned NOT NULL COMMENT '产出物品ID',
  `min_amount` int(10) unsigned NOT NULL COMMENT '最小产出数量',
  `max_amount` int(10) unsigned NOT NULL COMMENT '最大产出数量',
  `disaster_min_amount` int(10) unsigned NOT NULL DEFAULT '500' COMMENT '有灾害时最小产出数量',
  `disaster_max_amount` int(10) unsigned NOT NULL DEFAULT '2000' COMMENT '有灾害时最大产出数量',
  `probability` decimal(7,4) NOT NULL COMMENT '产出概率(0-1)',
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为默认产出',
  `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_seed_id` (`seed_id`) USING BTREE,
  KEY `idx_item_id` (`item_id`) USING BTREE,
  KEY `idx_probability` (`probability`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='种子产出配置表';
