-- ****************************************************************** -- 表 kku_task_user_progress 的创建SQL -- 对应的Model: App\Module\Task\Models\TaskUserProgress -- 警告: 此文件由系统自动生成,禁止修改! -- ****************************************************************** CREATE TABLE `kku_task_user_progress` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键', `user_id` int NOT NULL COMMENT '用户ID', `task_id` int NOT NULL COMMENT '任务ID,外键关联task_tasks表', `achievement_condition_id` int NOT NULL COMMENT '达成条件ID,外键关联task_achievement_conditions表', `current_value` int NOT NULL DEFAULT '0' COMMENT '当前值', `last_update_time` timestamp NULL DEFAULT NULL COMMENT '最后更新时间', `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `idx_user_task_condition` (`user_id`,`task_id`,`achievement_condition_id`) USING BTREE, KEY `idx_user_task` (`user_id`,`task_id`) USING BTREE, KEY `idx_achievement_condition` (`achievement_condition_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户任务进度表';