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.BackupMethodEnum;
import com.qmth.teachcloud.common.enums.DrawRuleEnum;
import com.qmth.distributed.print.business.enums.ExamPrintPlanSyncStatusEnum;
import com.qmth.distributed.print.business.enums.PrintPlanStatusEnum;
import com.qmth.teachcloud.common.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 印刷计划管理
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@TableName("exam_print_plan")
public class ExamPrintPlan extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @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;

    /**
     * 印刷计划名称
     */
    private String name;
    /**
     * 考试开始时间
     */
    @TableField("exam_start_time")
    private Long examStartTime;
    /**
     * 考试结束时间
     */
    @TableField("exam_end_time")
    private Long examEndTime;
    /**
     * {“PAPER”, "CARD"}
     */
    @TableField("print_content")
    private String printContent;
    /**
     * PLACE-按考点，ROOM-按考场
     */
    @TableField("backup_method")
    private BackupMethodEnum backupMethod;
    @TableField("backup_count")
    private Integer backupCount;
    /**
     * ONE-只抽一次，CIRCLE-可循环抽取
     */
    @TableField("draw_rule")
    private DrawRuleEnum drawRule;
    /**
     * [
     * {
     * "type": "SIGN",
     * "usedId": 1,
     * "backupMethod": "ROOM",
     * "backupCount": 3
     * },
     * {
     * "type": "PACKAG",
     * "usedId": 3,
     * "backupMethod": "STUDENT",
     * "backupCount": 5
     * }
     * ]
     */
    @TableField("variable_content")
    private String variableContent;
    /**
     * [
     * {
     * "type": "CHECK_IN",
     * "usedId": 1,
     * "backupMethod": "ROOM",
     * "backupCount": 3
     * }
     * ]
     */
    @TableField("ordinary_content")
    private String ordinaryContent;
    private PrintPlanStatusEnum status;

    @TableField("third_relate_id")
    private Long thirdRelateId;

    @TableField("third_relate_name")
    private String thirdRelateName;

    @TableField("sync_status")
    private ExamPrintPlanSyncStatusEnum syncStatus;

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

    public Long getExamId() {
        return examId;
    }

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

    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 getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getExamStartTime() {
        return examStartTime;
    }

    public void setExamStartTime(Long examStartTime) {
        this.examStartTime = examStartTime;
    }

    public Long getExamEndTime() {
        return examEndTime;
    }

    public void setExamEndTime(Long examEndTime) {
        this.examEndTime = examEndTime;
    }

    public String getPrintContent() {
        return printContent;
    }

    public void setPrintContent(String printContent) {
        this.printContent = printContent;
    }

    public BackupMethodEnum getBackupMethod() {
        return backupMethod;
    }

    public void setBackupMethod(BackupMethodEnum backupMethod) {
        this.backupMethod = backupMethod;
    }

    public Integer getBackupCount() {
        return backupCount;
    }

    public void setBackupCount(Integer backupCount) {
        this.backupCount = backupCount;
    }

    public DrawRuleEnum getDrawRule() {
        return drawRule;
    }

    public void setDrawRule(DrawRuleEnum drawRule) {
        this.drawRule = drawRule;
    }

    public String getVariableContent() {
        return variableContent;
    }

    public void setVariableContent(String variableContent) {
        this.variableContent = variableContent;
    }

    public String getOrdinaryContent() {
        return ordinaryContent;
    }

    public void setOrdinaryContent(String ordinaryContent) {
        this.ordinaryContent = ordinaryContent;
    }

    public PrintPlanStatusEnum getStatus() {
        return status;
    }

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

    public Long getThirdRelateId() {
        return thirdRelateId;
    }

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

    public String getThirdRelateName() {
        return thirdRelateName;
    }

    public void setThirdRelateName(String thirdRelateName) {
        this.thirdRelateName = thirdRelateName;
    }

    public ExamPrintPlanSyncStatusEnum getSyncStatus() {
        return syncStatus;
    }

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