| 12345678910111213141516171819 |
- -- ******************************************************************
- -- 表 kku_farm_lands 的创建SQL
- -- 对应的Model: App\Module\Farm\Models\FarmLand
- -- 警告: 此文件由系统自动生成,禁止修改!
- -- ******************************************************************
- CREATE TABLE `kku_farm_lands` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
- `user_id` bigint NOT NULL COMMENT '用户ID',
- `position` tinyint unsigned NOT NULL COMMENT '土地位置(1-20)',
- `land_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '土地类型:1普通,2红土,3黑土,4金,5蓝,6紫',
- `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '土地状态:0空闲,1种植中,2灾害,3可收获,4枯萎',
- `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,
- UNIQUE KEY `idx_user_position` (`user_id`,`position`) USING BTREE,
- KEY `idx_user_id` (`user_id`) USING BTREE,
- KEY `idx_status` (`status`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='土地信息表';
|