package com.qmth.distributed.print.business.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.distributed.print.business.enums.ExamStatusEnum;
import com.qmth.distributed.print.business.enums.ReviewStatusEnum;
import com.qmth.teachcloud.common.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 命题任务
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@TableName("exam_task")
public class ExamTask extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考试id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("exam_id")
    private Long examId;

    @ApiModelProperty(value = "学校id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("school_id")
    private Long schoolId;

    @ApiModelProperty(value = "机构id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "org_id", updateStrategy = FieldStrategy.IGNORED)
    private Long orgId;

    /**
     * 课程代码
     */
    @TableField("course_code")
    private String courseCode;
    /**
     * 课程名称
     */
    @TableField("course_name")
    private String courseName;
    /**
     * 适用专业
     */
    private String specialty;
    /**
     * 试卷编号
     */
    @TableField("paper_number")
    private String paperNumber;

    /**
     * 试卷编号ID
     */
    @TableField("paper_number_id")
    private Long paperNumberId;

    /**
     * 课程创建的任务序号
     */
    @TableField("sequence")
    private String sequence;
    /**
     * 命题开始时间
     */
    @TableField("start_time")
    private Long startTime;
    /**
     * 命题结束时间
     */
    @TableField("end_time")
    private Long endTime;
    /**
     * 题卡规则
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("card_rule_id")
    private Long cardRuleId;
    /**
     * 命题老师
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("user_id")
    private Long userId;
    /**
     * NEW-新建任务，STAGE-暂存（命题中），SUBMIT-确认提交，CANCEL-撤回
     */
    private ExamStatusEnum status;
    /**
     * 0-禁用，1-启用
     */
    private Boolean review;
    /**
     * 审核状态：PASS-审核通过，NOT_PASS-审核不通过，默认为空-未审核
     */
    @TableField("review_status")
    private ReviewStatusEnum reviewStatus;
    /**
     * 0-禁用，1-启用
     */
    private Boolean enable;

    @TableField("batch_no")
    private String batchNo;

    @TableField("teaching_room_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long teachingRoomId;

    @TableField("teacher_name")
    private String teacherName;

    @TableField("lecturer_name")
    private String lecturerName;

    @TableField("paper_name")
    private String paperName;

    @TableField(exist = false)
    private List<Map<String, String>> users;

    @ApiModelProperty(value = "流程id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "flow_id", updateStrategy = FieldStrategy.IGNORED)
    private Long flowId;

    @ApiModelProperty(value = "命题任务审批表记录")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "approve_form_attachment_id")
    private Long approveFormAttachmentId;

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public Long getFlowId() {
        return flowId;
    }

    public void setFlowId(Long flowId) {
        this.flowId = flowId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public String getPaperNumber() {
        return paperNumber;
    }

    public void setPaperNumber(String paperNumber) {
        this.paperNumber = paperNumber;
    }

    public Long getPaperNumberId() {
        return paperNumberId;
    }

    public void setPaperNumberId(Long paperNumberId) {
        this.paperNumberId = paperNumberId;
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Long getCardRuleId() {
        return cardRuleId;
    }

    public void setCardRuleId(Long cardRuleId) {
        this.cardRuleId = cardRuleId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public ExamStatusEnum getStatus() {
        return status;
    }

    public void setStatus(ExamStatusEnum status) {
        this.status = status;
    }

    public Boolean getReview() {
        return review;
    }

    public void setReview(Boolean review) {
        this.review = review;
    }

    public ReviewStatusEnum getReviewStatus() {
        return reviewStatus;
    }

    public void setReviewStatus(ReviewStatusEnum reviewStatus) {
        this.reviewStatus = reviewStatus;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public Long getTeachingRoomId() {
        return teachingRoomId;
    }

    public void setTeachingRoomId(Long teachingRoomId) {
        this.teachingRoomId = teachingRoomId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getLecturerName() {
        return lecturerName;
    }

    public void setLecturerName(String lecturerName) {
        this.lecturerName = lecturerName;
    }

    public String getPaperName() {
        return paperName;
    }

    public void setPaperName(String paperName) {
        this.paperName = paperName;
    }

    public List<Map<String, String>> getUsers() {
        return users;
    }

    public void setUsers(List<Map<String, String>> users) {
        this.users = users;
    }

    public Long getApproveFormAttachmentId() {
        return approveFormAttachmentId;
    }

    public void setApproveFormAttachmentId(Long approveFormAttachmentId) {
        this.approveFormAttachmentId = approveFormAttachmentId;
    }
}
