package com.qmth.teachcloud.common.entity;

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.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.enums.DrawRuleEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 印品
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@TableName("basic_print_config")
public class BasicPrintConfig 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("exam_id")
    private Long examId;

    /**
     * 1启用/0禁用
     */
    @TableField("enable")
    private Boolean enable;

    /**
     * 题卡规则（-1代表通卡）
     */
    @ApiModelProperty(value = "题卡规则ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("card_rule_id")
    private Long cardRuleId;

    /**
     * 试卷、题卡
     */
    @TableField("print_content")
    private String printContent;

    /**
     * 试卷题卡备份方式（ROOM按考场）
     */
    @TableField("backup_method")
    private String backupMethod;

    /**
     * 试卷题卡备份数量
     */
    @TableField("backup_count")
    private Integer backupCount;

    /**
     * 抽卷规则（ONE只抽一次，CIRCLE循环抽取）
     */
    @TableField("draw_rule")
    private DrawRuleEnum drawRule;

    /**
     * 变量印品参数json
     */
    @TableField("variable_content")
    private String variableContent;

    /**
     * 普通印品参数json
     */
    @TableField("ordinary_content")
    private String ordinaryContent;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(exist = false)
    private Long[] orgIds;

    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 Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Long getCardRuleId() {
        return cardRuleId;
    }

    public void setCardRuleId(Long cardRuleId) {
        this.cardRuleId = cardRuleId;
    }

    public String getPrintContent() {
        return printContent;
    }

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

    public String getBackupMethod() {
        return backupMethod;
    }

    public void setBackupMethod(String 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 Long[] getOrgIds() {
        return orgIds;
    }

    public void setOrgIds(Long[] orgIds) {
        this.orgIds = orgIds;
    }
}
