package cn.estsh.i3plus.pojo.wms.bean.template;

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.Table;

/**
 * @Description : 导入模板明细信息
 * @Reference :
 * @Author : siliter.yuan
 * @CreateDate : 2020-04-16 14:21
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BAS_IMPORT_TEMPLATE_DETAILS")
@Api("导入模板明细信息")
public class BasImportTemplateDetails extends BaseBean{

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

    @Column(name="TABLE_NAME")
    @ApiParam("表名称")
    private String tableName;

    @Column(name="FIELD_CODE")
    @ApiParam("字段英文名称")
    private String fieldCode;

    @Column(name="FIELD_ALIAS")
    @ApiParam("字段别名")
    private String fieldAlias;

    @Column(name="LABEL_CODE")
    @ApiParam("标签代码")
    private String labelCode;

    @Column(name="LABEL_NAME")
    @ApiParam("标签名称")
    private String labelName;

    @Column(name="DEFAULT_VALUE")
    @ApiParam("默认值")
    private String defaultValue;

    /**
     * 数据格式 文本、整数、小数、日期
     */
    @Column(name="DATA_FORAMT")
    @ApiParam("数据格式")
    private String dataFormat;

    /**
     *  1-是，2-否
     */
    @Column(name="IS_REQUIRE")
    @ApiParam(value = "是否必填", example = "0")
    private Integer isRequire;

    @Column(name="DECIMAIL_SPLIT")
    @ApiParam("小数点分隔符")
    private String decimalSplit;

    @Column(name="THOUSANDS_SPLIT")
    @ApiParam("千分位分隔符")
    private String thousandsSplit;

    // YYYY-MM-DD/DD-MM-YY/YYYY-MM-DD HH:mm:ss
    @Column(name="DATE_FORMAT")
    @ApiParam("日期格式")
    private String dateFormat;

    @Column(name="REMARK")
    @ApiParam("备注")
    private String remark;

    @Column(name="SEQ")
    @ApiParam(value = "序号", example = "0")
    private Integer seq;

    @Column(name="MAX_LENGTH")
    @ApiParam(value = "最大长度", example = "0")
    private Integer maxLength;

    @Column(name="RELATION_TABLE")
    @ApiParam("关联表名")
    private String relationTable;

    @Column(name="RELATION_FIELD")
    @ApiParam("关联字段")
    private String relationField;

    /**
     * 是否主键 1-是，2-否
     */
    @Column(name="IS_PK")
    @ApiParam(value = "是否主键", example = "0")
    private Integer isPk;

    @Column(name="SHEET_NAME")
    @ApiParam("工作薄名称")
    private String sheetName;
}