package cn.estsh.i3plus.pojo.platform.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Description : 打印模板
 * @Reference :
 * @Author : siliter
 * @CreateDate : 2019-03-18 11:00
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_LABEL_TEMPLATE")
@Api(value="打印模板",description = "打印模板")
public class SysLabelTemplate extends BaseBean {

    private static final long serialVersionUID = 5371856566557305323L;
    @Column(name="TEMPLATE_CODE")
    @ApiParam(value ="模板代码")
    private String templateCode;

    @Column(name="TEMPLATE_NAME")
    @ApiParam(value ="模板名称")
    private String templateName;

    //枚举 CommonEnumUtil.SOFT_TYPE
    @Column(name="TEMPLATE_SOFT_TYPE")
    @ApiParam(value ="模板所属模块")
    private Integer templateSoftType;

    //枚举 CommonEnumUtil.SOFT_TYPE
    @Column(name="TEMPLATE_GROUP_ID")
    @ApiParam(value ="模板分组")
    private Integer templateGroupId;

    @Lob
    @Column(name="TEMPLATE_CONTENT")
    @ApiParam(value ="模板内容")
    private String templateContent;

    @Lob
    @Column(name="OTHER_TEMPLATE_CONTENT")
    @ApiParam(value ="其他模板内容")
    private String otherTemplateContent;

    // 参数拼接，多参数都好分隔，后台在做处理
    @Transient
    @ApiParam(value ="模板参数拼接")
    private String paramsPack;

    @Column(name = "METHOD_CODE")
    @ApiParam("方法代码")
    private String methodCode;

    @Transient
    @ApiParam(value ="模板id对应的模板参数")
    private List<SysLabelTemplateParam> labelTemplateParamList;
}
