
CREATE TABLE `course_student_work`  (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `course_id` bigint NULL DEFAULT NULL COMMENT '授课ID',
  `story_id` bigint NULL DEFAULT NULL COMMENT '任务ID',
  `student_id` bigint NULL DEFAULT NULL COMMENT '学生的ID',
  `submit_id` bigint NULL DEFAULT NULL COMMENT '提交人ID 对于团队任务是队长ID',
  `submit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提交人名字（团队是队长名）',
  `teamwork` bit(1) NULL DEFAULT NULL COMMENT '是否是团队合作',
  `objective` bit(1) NULL DEFAULT NULL COMMENT '是否是客观题答案',
  `mysql` bit(1) NULL DEFAULT NULL COMMENT '是否是mysql答案',
  `group_id` bigint NULL DEFAULT NULL COMMENT '团队ID',
  `contribution` decimal(11, 2) NULL DEFAULT NULL COMMENT '团队作业贡献度',
  `answer_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '客观题答案json',
  `file_name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文件名 多个使用|分割',
  `file_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '文件URL 多个使用|分割',
  `scrap_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '碎片文件URL',
  `scrap_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '表格JSON',
  `score` decimal(11, 2) NULL DEFAULT NULL COMMENT '得分',
  `score_by` bigint NULL DEFAULT NULL COMMENT '评分人',
  `score_time` datetime NULL DEFAULT NULL COMMENT '评分时间',
  `team_score` decimal(11, 2) NULL DEFAULT NULL COMMENT '团队任务的总分',
  `status` bit(1) NULL DEFAULT NULL COMMENT '点评状态 1=已点评 0=未点评',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '评语',
  `round` int NULL DEFAULT NULL COMMENT '第几次提交 -1表示无需提交作业的任务学生点了完成',
  `last_one` bit(1) NULL DEFAULT NULL COMMENT '是否是最后一次提交',
  `aspose_ok` bit(1) NULL DEFAULT NULL COMMENT '是否成功生成文档',
  `aspose_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成文档状态',
  `aspose_time` datetime NULL DEFAULT NULL COMMENT '文档生成时间',
  `aspose_error` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档生成错误原因',
  `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
  `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
  `recommend` bit(1) NULL DEFAULT NULL COMMENT '是否推荐',
  `recommend_rank` int NULL DEFAULT NULL COMMENT '推荐星级',
  `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '班级名称（dept表里的）',
  `group_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '团队名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '学生作业' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
