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.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.enums.ClassifyEnum;
import com.qmth.teachcloud.common.enums.FontSizeEnum;
import com.sun.org.apache.xpath.internal.operations.Bool;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 通用模板
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@TableName("basic_template")
public class BasicTemplate 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;

    /**
     * template_type值为VARIABLE、ORDINARY时，不为空。
     * SIGN-签到表，PACKAGE-卷袋贴，CHECK_IN-登记表
     */
    private ClassifyEnum classify;
    /**
     * 卷袋贴、签到表数据范围
     */
    private String displayRange;
    /**
     * 预览地址
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String previewPath;
    /**
     * 模板附件ID（保存到附件表ID）
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("attachment_id")
    private Long attachmentId;
    /**
     * 0-禁用，1-启用
     */
    private Boolean enable = true;

    /**
     * 考生信息是否双列显示
     */
    private Boolean diallel;
    /**
     * 是否增加空白页
     */
    private Boolean addBlankPage;
    /**
     * 行间距在初始值基础上扩大倍数
     */
    private Double lineHeightTimes;
    /**
     * 字体大小（small,medium,large）
     */
    private FontSizeEnum fontSize;

    /**
     * 文字说明
     */
    private String textDesc;
    /**
     * 备注
     */
    private String remark;

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

    @TableField(exist = false)
    private String url;

    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 ClassifyEnum getClassify() {
        return classify;
    }

    public void setClassify(ClassifyEnum classify) {
        this.classify = classify;
    }

    public String getDisplayRange() {
        return displayRange;
    }

    public void setDisplayRange(String displayRange) {
        this.displayRange = displayRange;
    }

    public String getPreviewPath() {
        return previewPath;
    }

    public void setPreviewPath(String previewPath) {
        this.previewPath = previewPath;
    }

    public Long getAttachmentId() {
        return attachmentId;
    }

    public void setAttachmentId(Long attachmentId) {
        this.attachmentId = attachmentId;
    }

    public Boolean getEnable() {
        return enable;
    }

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

    public Boolean getDiallel() {
        return diallel;
    }

    public void setDiallel(Boolean diallel) {
        this.diallel = diallel;
    }

    public Boolean getAddBlankPage() {
        return addBlankPage;
    }

    public void setAddBlankPage(Boolean addBlankPage) {
        this.addBlankPage = addBlankPage;
    }

    public Double getLineHeightTimes() {
        return lineHeightTimes;
    }

    public void setLineHeightTimes(Double lineHeightTimes) {
        this.lineHeightTimes = lineHeightTimes;
    }

    public FontSizeEnum getFontSize() {
        return fontSize;
    }

    public void setFontSize(FontSizeEnum fontSize) {
        this.fontSize = fontSize;
    }

    public String getTextDesc() {
        return textDesc;
    }

    public void setTextDesc(String textDesc) {
        this.textDesc = textDesc;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long[] getOrgIds() {
        return orgIds;
    }

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

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
