package com.qmth.teachcloud.mark.entity;

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

import com.baomidou.mybatisplus.annotation.TableField;
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.enums.scan.ConditionType;
import com.qmth.teachcloud.mark.bean.OmrTaskPage;
import com.qmth.teachcloud.mark.enums.OmrTaskStatus;
import com.qmth.teachcloud.mark.handle.OmrTaskPageListTypeHandler;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author xf
 * @since 2023-09-22
 */
@TableName(value = "scan_omr_task", autoResultMap = true)
@ApiModel(value = "ScanOmrTask对象", description = "")
public class ScanOmrTask implements Serializable {

	private static final long serialVersionUID = 1L;

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

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

	@ApiModelProperty(value = "条件")
	private ConditionType conditions;

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

	@ApiModelProperty(value = "试卷页数")
	private Integer paperIndex;

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

	@ApiModelProperty(value = "题卡编号")
	private Integer cardNumber;

	@ApiModelProperty(value = "状态")
	private OmrTaskStatus status;

	@JsonSerialize(using = ToStringSerializer.class)
	private Long userId;

	@TableField(value = "pages", typeHandler = OmrTaskPageListTypeHandler.class)
	private List<OmrTaskPage> pages;

	@JsonSerialize(using = ToStringSerializer.class)
	private Long creatorId;

	@JsonSerialize(using = ToStringSerializer.class)
	private Long updaterId;

	private Long createTime;

	private Long updateTime;

	@TableField(exist = false)
	private String courseCode;
	@TableField(exist = false)
	private String coursePaperId;

	@TableField(exist = false)
	private String markPaperStatus;

	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 ConditionType getConditions() {
		return conditions;
	}

	public void setConditions(ConditionType conditions) {
		this.conditions = conditions;
	}

	public Long getStudentId() {
		return studentId;
	}

	public void setStudentId(Long studentId) {
		this.studentId = studentId;
	}

	public Integer getPaperIndex() {
		return paperIndex;
	}

	public void setPaperIndex(Integer paperIndex) {
		this.paperIndex = paperIndex;
	}

	public Long getPaperId() {
		return paperId;
	}

	public void setPaperId(Long paperId) {
		this.paperId = paperId;
	}

	public Integer getCardNumber() {
		return cardNumber;
	}

	public void setCardNumber(Integer cardNumber) {
		this.cardNumber = cardNumber;
	}

	public OmrTaskStatus getStatus() {
		return status;
	}

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

	public Long getUserId() {
		return userId;
	}

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

	public Long getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public Long getUpdaterId() {
		return updaterId;
	}

	public void setUpdaterId(Long updaterId) {
		this.updaterId = updaterId;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public Long getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}

	public List<OmrTaskPage> getPages() {
		return pages;
	}

	public void setPages(List<OmrTaskPage> pages) {
		this.pages = pages;
	}

	public String getCourseCode() {
		return courseCode;
	}

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

	public String getCoursePaperId() {
		return coursePaperId;
	}

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

	public String getMarkPaperStatus() {
		return markPaperStatus;
	}

	public void setMarkPaperStatus(String markPaperStatus) {
		this.markPaperStatus = markPaperStatus;
	}

	@Override
    public String toString() {
        return "ScanOmrTask{" +
            "id=" + id +
            ", examId=" + examId +
            ", conditions=" + conditions +
            ", studentId=" + studentId +
            ", paperIndex=" + paperIndex +
            ", paperId=" + paperId +
            ", cardNumber=" + cardNumber +
            ", status=" + status +
            ", userId=" + userId +
            ", pages=" + pages +
            ", creatorId=" + creatorId +
            ", updaterId=" + updaterId +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
        "}";
    }
}
