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