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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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;

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

    private static final long serialVersionUID = 7292367173575992422L;

    @Column(name = "TEMPLATE_ID")
    @ApiParam(value = "模板ID", access = "模板ID", example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long templateId;

    @Column(name = "TEMPLATE_CODE")
    @ApiParam(value = "模板代码")
    private String templateCode;

    @Column(name = "TEMPLATE_PARAM")
    @ApiParam(value = "模板参数")
    private String templateParam;

    @Lob
    @Column(name = "TEMPLATE_PARAM_TEXT")
    @ApiParam(value = "模板参数描述")
    private String templateParamText;

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