package com.qmth.distributed.print.business.bean.params;

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 io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Description: 印刷计划保存参数
 * @Author: CaoZixuan
 * @Date: 2021-04-06
 */
public class PrintPlanParams {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "印刷计划id")
    private Long id;

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

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

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "机构id")
    private Long orgId;

    @ApiModelProperty(value = "印刷计划名称",required = true)
    @NotNull(message = "请输入印刷计划名称")
    @Length(min = 1,message = "请输入印刷计划名称")
    private String name;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考试开始时间",required = true)
    @NotNull(message = "请输入考试开始时间")
    @Range(min = 1L,message = "请输入考试开始时间")
    private Long examStartTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考试结束时间",required = true)
    @NotNull(message = "请输入考试结束时间")
    @Range(min = 1L,message = "请输入考试结束时间")
    private Long examEndTime;

    @ApiModelProperty(value = "*打印内容：{“PAPER”, \"CARD\"}",required = true)
    @NotNull(message = "请输入打印内容")
    private List<String> printContent;

    @ApiModelProperty(value = "备份方式：PLACE-按考点，ROOM-按考场",required = true)
    @NotNull(message = "请输入备份方式")
    private BackupMethodEnum backupMethod;

    @ApiModelProperty(value = "备份数量",required = true)
    @NotNull(message = "请输入备份数量")
    @Range(min = 0,message = "请输入正数")
    private Integer backupCount;

    @ApiModelProperty(value = "抽卷规则：ONE-只抽一次，CIRCLE-可循环抽取",required = true)
    @NotNull(message = "请设置抽卷规则")
    private DrawRuleEnum drawRule;

    @ApiModelProperty(value = "变量印品：样例",required = true)
    @NotNull(message = "请设置变量印品")
    private String variableContent;

    @ApiModelProperty(value = "普通印品：样例",required = true)
    @NotNull(message = "请设置普通印品")
    private String ordinaryContent;

    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 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 List<String> getPrintContent() {
        return printContent;
    }

    public void setPrintContent(List<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;
    }
}
