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

CREATE TABLE `kku_farm_users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `house_level` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '房屋等级',
  `last_upgrade_time` timestamp NULL DEFAULT NULL COMMENT '最后升级时间',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_user_id` (`user_id`) USING BTREE,
  KEY `idx_house_level` (`house_level`) USING BTREE,
  KEY `idx_last_upgrade_time` (`last_upgrade_time`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='用户农场信息表';
