-- ****************************************************************** -- 表 kku_farm_daily_stats 的创建SQL -- 对应的Model: App\Module\Farm\Models\FarmDailyStats -- 警告: 此文件由系统自动生成,禁止修改! -- ****************************************************************** CREATE TABLE `kku_farm_daily_stats` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', `stats_date` date NOT NULL COMMENT '统计日期', `total_users` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总用户数', `active_users` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活跃用户数(当日有操作)', `house_level_1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '1级房屋数量', `house_level_2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '2级房屋数量', `house_level_3` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '3级房屋数量', `house_level_4` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '4级房屋数量', `house_level_5` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '5级房屋数量', `house_level_6` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '6级房屋数量', `house_level_7` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '7级房屋数量', `house_level_8` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '8级房屋数量', `house_level_9` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '9级房屋数量', `house_level_10` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '10级房屋数量', `land_type_1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '普通土地数量', `land_type_2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '红土地数量', `land_type_3` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '黑土地数量', `land_type_4` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '金色特殊土地数量', `land_type_5` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '蓝色特殊土地数量', `land_type_6` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '紫色特殊土地数量', `land_status_0` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '空闲土地数量', `land_status_1` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '种植中土地数量', `land_status_2` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '灾害土地数量', `land_status_3` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '可收获土地数量', `land_status_4` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '枯萎土地数量', `total_lands` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总土地数量', `total_special_lands` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '特殊土地总数量', `total_crops` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总作物数量', `crops_seed_stage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '种子期作物数量', `total_disasters` int(10) unsigned 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 '更新时间', `crops_sprout_stage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发芽期作物数量', `crops_growth_stage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '生长期作物数量', `crops_fruit_stage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '果实期作物数量', `crops_mature_stage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '成熟期作物数量', `crops_withered_stage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '枯萎期作物数量', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `idx_stats_date` (`stats_date`) USING BTREE, KEY `idx_created_at` (`created_at`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='农场每日统计表';