package com.qmth.teachcloud.mark.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.contant.SystemConstant;
import com.qmth.teachcloud.common.enums.mark.MarkMode;
import com.qmth.teachcloud.common.enums.mark.MarkPaperStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 考试科目表
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
@TableName("mark_paper")
@ApiModel(value = "MarkPaper对象", description = "考试科目表")
public class MarkPaper implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    @TableId(value = "id")
    private Long id;

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

    @ApiModelProperty(value = "课程代码")
    private String courseCode;

    @ApiModelProperty(value = "科目名称")
    private String courseName;

    @ApiModelProperty(value = "试卷编号（显示）")
    private String paperNumber;

    @ApiModelProperty(value = "试卷编号（交互）")
    private String coursePaperId;

    @ApiModelProperty(value = "客观题满分")
    private Double objectiveScore;

    @ApiModelProperty(value = "主观题满分")
    private Double subjectiveScore;

    @ApiModelProperty(value = "全卷满分")
    private Double totalScore;

    @ApiModelProperty(value = "考生人数")
    private Integer studentCount;

    @ApiModelProperty(value = "已上传人数")
    private Integer uploadCount;

    @ApiModelProperty(value = "缺考人数")
    private Integer absentCount;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "原图遮盖配置")
    private String sheetConfig;

    @ApiModelProperty(value = "及格分")
    private Double passScore;

    @ApiModelProperty(value = "优秀分")
    private Double excellentScore;

    @ApiModelProperty(value = "题卡类型")
    private String cardType;

    @ApiModelProperty(value = "试卷文件类型")
    private String paperFilePath;

    @ApiModelProperty(value = "标答文件类型")
    private String answerFilePath;

    @ApiModelProperty(value = "评卷是否跳转")
    private Boolean autoScroll;

    @ApiModelProperty(value = "评卷模式")
    private MarkMode markMode;

    @ApiModelProperty(value = "强制评卷模式")
    private Boolean forceMode;

    @ApiModelProperty(value = "评卷开始时间")
    private Long markStartTime;

    @ApiModelProperty(value = "评卷结束时间")
    private Long markEndTime;

    @ApiModelProperty(value = "是否原卷显示")
    private Boolean sheetView;

    @ApiModelProperty(value = "评卷是否显示客观分")
    private Boolean showObjectScore;
    @ApiModelProperty(value = "评卷分组是否提交")
    private Boolean groupStatus;

    @ApiModelProperty(value = "是否开启分班阅")
    private Boolean openMarkClass;

    @ApiModelProperty(value = "是否开启双评")
    private Boolean openDoubleMarking;

    private MarkPaperStatus status;
    @ApiModelProperty(value = "命题老师ID")
    private Long userId;

    @ApiModelProperty(value = "试卷类型")
    private String paperType;

    public MarkPaper() {
    }

    public MarkPaper(Long examId, String courseCode, String courseName, String paperNumber, String coursePaperId, Long userId, String paperType) {
        this.id = SystemConstant.getDbUuid();
        this.examId = examId;
        this.courseCode = courseCode;
        this.courseName = courseName;
        this.paperNumber = paperNumber;
        this.coursePaperId = coursePaperId;
        this.userId = userId;
        this.paperType = paperType;
        this.markMode = MarkMode.TRACK;
        this.objectiveScore = 0D;
        this.subjectiveScore = 0D;
        this.totalScore = 0D;
        this.studentCount = 0;
        this.uploadCount = 0;
        this.absentCount = 0;
        this.groupStatus = false;
        this.openMarkClass = false;
        this.openDoubleMarking = false;
        this.status = MarkPaperStatus.FORMAL;
        this.passScore = 60D;
        this.excellentScore = 80D;
        this.forceMode = true;
        this.showObjectScore = false;
    }

    public MarkPaper(Long examId, String courseCode, String courseName, String paperNumber, Double totalScore, Double passScore) {
        this.examId = examId;
        this.courseCode = courseCode;
        this.courseName = courseName;
        this.paperNumber = paperNumber;
        this.totalScore = totalScore;
        this.passScore = passScore;
        this.excellentScore = 80d;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getExamId() {
        return examId;
    }

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

    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 getPaperNumber() {
        return paperNumber;
    }

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

    public String getCoursePaperId() {
        return coursePaperId;
    }

    public void setCoursePaperId(String coursePaperId) {
        this.coursePaperId = coursePaperId;
    }

    public Double getObjectiveScore() {
        return objectiveScore;
    }

    public void setObjectiveScore(Double objectiveScore) {
        this.objectiveScore = objectiveScore;
    }

    public Double getSubjectiveScore() {
        return subjectiveScore;
    }

    public void setSubjectiveScore(Double subjectiveScore) {
        this.subjectiveScore = subjectiveScore;
    }

    public Double getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(Double totalScore) {
        this.totalScore = totalScore;
    }

    public Integer getStudentCount() {
        return studentCount;
    }

    public void setStudentCount(Integer studentCount) {
        this.studentCount = studentCount;
    }

    public Integer getUploadCount() {
        return uploadCount;
    }

    public void setUploadCount(Integer uploadCount) {
        this.uploadCount = uploadCount;
    }

    public Integer getAbsentCount() {
        return absentCount;
    }

    public void setAbsentCount(Integer absentCount) {
        this.absentCount = absentCount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getSheetConfig() {
        return sheetConfig;
    }

    public void setSheetConfig(String sheetConfig) {
        this.sheetConfig = sheetConfig;
    }

    public Double getPassScore() {
        return passScore;
    }

    public void setPassScore(Double passScore) {
        this.passScore = passScore;
    }

    public Double getExcellentScore() {
        return excellentScore;
    }

    public void setExcellentScore(Double excellentScore) {
        this.excellentScore = excellentScore;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getPaperFilePath() {
        return paperFilePath;
    }

    public void setPaperFilePath(String paperFilePath) {
        this.paperFilePath = paperFilePath;
    }

    public String getAnswerFilePath() {
        return answerFilePath;
    }

    public void setAnswerFilePath(String answerFilePath) {
        this.answerFilePath = answerFilePath;
    }

    public Boolean getAutoScroll() {
        return autoScroll;
    }

    public void setAutoScroll(Boolean autoScroll) {
        this.autoScroll = autoScroll;
    }

    public MarkMode getMarkMode() {
        return markMode;
    }

    public void setMarkMode(MarkMode markMode) {
        this.markMode = markMode;
    }

    public Boolean getForceMode() {
        return forceMode;
    }

    public void setForceMode(Boolean forceMode) {
        this.forceMode = forceMode;
    }

    public Long getMarkStartTime() {
        return markStartTime;
    }

    public void setMarkStartTime(Long markStartTime) {
        this.markStartTime = markStartTime;
    }

    public Long getMarkEndTime() {
        return markEndTime;
    }

    public void setMarkEndTime(Long markEndTime) {
        this.markEndTime = markEndTime;
    }

    public Boolean getSheetView() {
        return sheetView;
    }

    public void setSheetView(Boolean sheetView) {
        this.sheetView = sheetView;
    }

    public Boolean getShowObjectScore() {
        return showObjectScore;
    }

    public void setShowObjectScore(Boolean showObjectScore) {
        this.showObjectScore = showObjectScore;
    }

    public Boolean getGroupStatus() {
        return groupStatus;
    }

    public void setGroupStatus(Boolean groupStatus) {
        this.groupStatus = groupStatus;
    }

    public Boolean getOpenMarkClass() {
        return openMarkClass;
    }

    public void setOpenMarkClass(Boolean openMarkClass) {
        this.openMarkClass = openMarkClass;
    }

    public Boolean getOpenDoubleMarking() {
        return openDoubleMarking;
    }

    public void setOpenDoubleMarking(Boolean openDoubleMarking) {
        this.openDoubleMarking = openDoubleMarking;
    }

    public MarkPaperStatus getStatus() {
        return status;
    }

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

    public Long getUserId() {
        return userId;
    }

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

    public String getPaperType() {
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    @Override
    public String toString() {
        return "MarkPaper{" +
                "examId=" + examId +
                ", courseCode=" + courseCode +
                ", courseName=" + courseName +
                ", paperNumber=" + paperNumber +
                ", objectiveScore=" + objectiveScore +
                ", subjectiveScore=" + subjectiveScore +
                ", totalScore=" + totalScore +
                ", studentCount=" + studentCount +
                ", uploadCount=" + uploadCount +
                ", absentCount=" + absentCount +
                ", remark=" + remark +
                ", sheetConfig=" + sheetConfig +
                ", passScore=" + passScore +
                ", excellentScore=" + excellentScore +
                ", cardType=" + cardType +
                ", paperFilePath=" + paperFilePath +
                ", answerFilePath=" + answerFilePath +
                ", autoScroll=" + autoScroll +
                ", markMode=" + markMode +
                ", markStartTime=" + markStartTime +
                ", markEndTime=" + markEndTime +
                ", sheetView=" + sheetView +
                ", showObjectScore=" + showObjectScore +
                ", groupStatus=" + groupStatus +
                ", openMarkClass=" + openMarkClass +
                ", status=" + status +
                "}";
    }
}
