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.TemplateTypeEnum;
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("basic_template_org")
public class BasicTemplateOrg 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;

    /**
     * 模板类型：GENERIC-通卡模板，VARIABLE-变量印品模板，ORDINARY-普通印品模板，CARD_RULE-题卡规则
     */
    private TemplateTypeEnum type;
    /**
     * 通卡模板ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("rule_id")
    private Long ruleId;

    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 TemplateTypeEnum getType() {
        return type;
    }

    public void setType(TemplateTypeEnum type) {
        this.type = type;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }
}
