package cn.estsh.i3plus.pojo.mes.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.*;
import java.io.Serializable;
import java.util.List;

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

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

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

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

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

    @Column(name = "BATCH_METHOD_CODE")
    @ApiParam("批量方法代码")
    private String batchMethodCode;

    @ApiParam(value = "第二个模板内容")
    private String otherTemplateContent;

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

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

}
