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

import com.baomidou.mybatisplus.annotation.FieldStrategy;
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.distributed.print.business.enums.ExamStatusEnum;
import com.qmth.distributed.print.business.enums.ExamTaskSyncStatusEnum;
import com.qmth.distributed.print.business.enums.ReviewStatusEnum;
import com.qmth.teachcloud.common.annotation.EditKey;
import com.qmth.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.contant.SystemConstant;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * <p>
 * 数据同步
 * </p>
 *
 */
@TableName("exam_task_sync")
public class ExamTaskSync implements Serializable {

    private static final long serialVersionUID = 1L;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    @TableId(value = "id")
    @EditKey
    private Long id;

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

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

    /**
     * 课程代码
     */
    @TableField("course_code")
    private String courseCode;
    /**
     * 试卷编号
     */
    @TableField("paper_number")
    private String paperNumber;

    /**
     * 机构代码
     */
    @TableField("org_code")
    private String orgCode;

    /**
     * 云阅卷考试ID
     */
    @TableField("third_relate_id")
    private Integer thirdRelateId;
    /**
     * 同步状态
     */
    @TableField("sync_status")
    private ExamTaskSyncStatusEnum syncStatus;
    @TableField(value = "error_msg", updateStrategy = FieldStrategy.IGNORED)
    private String errorMsg;
    /**
     * 同步用户ID
     */
    @TableField("sync_user_id")
    private Long syncUserId;

    /**
     * 同步开始时间
     */
    @TableField("sync_start_time")
    private Long syncStartTime;
    /**
     * 同步结束时间
     */
    @TableField("sync_end_time")
    private Long syncEndTime;

    public ExamTaskSync() {
    }

    public ExamTaskSync(Long schoolId, Long examId, String courseCode, String paperNumber, String orgCode, Integer thirdRelateId, ExamTaskSyncStatusEnum syncStatus, Long syncUserId, Long syncStartTime, Long syncEndTime) {
        this.id = SystemConstant.getDbUuid();
        this.schoolId = schoolId;
        this.examId = examId;
        this.courseCode = courseCode;
        this.paperNumber = paperNumber;
        this.orgCode = orgCode;
        this.thirdRelateId = thirdRelateId;
        this.syncStatus = syncStatus;
        this.syncUserId = syncUserId;
        this.syncStartTime = syncStartTime;
        this.syncEndTime = syncEndTime;
    }

    public Long getId() {
        return id;
    }

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

    public Long getSchoolId() {
        return schoolId;
    }

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

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

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

    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    public Integer getThirdRelateId() {
        return thirdRelateId;
    }

    public void setThirdRelateId(Integer thirdRelateId) {
        this.thirdRelateId = thirdRelateId;
    }

    public ExamTaskSyncStatusEnum getSyncStatus() {
        return syncStatus;
    }

    public void setSyncStatus(ExamTaskSyncStatusEnum syncStatus) {
        this.syncStatus = syncStatus;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public Long getSyncUserId() {
        return syncUserId;
    }

    public void setSyncUserId(Long syncUserId) {
        this.syncUserId = syncUserId;
    }

    public Long getSyncStartTime() {
        return syncStartTime;
    }

    public void setSyncStartTime(Long syncStartTime) {
        this.syncStartTime = syncStartTime;
    }

    public Long getSyncEndTime() {
        return syncEndTime;
    }

    public void setSyncEndTime(Long syncEndTime) {
        this.syncEndTime = syncEndTime;
    }
}
