package cn.estsh.i3plus.pojo.mes.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;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Description : 导入模板信息
 * @Reference :
 * @Author : adair.song --复用--> siliter.yuan
 * @CreateDate : 2020-05-18 16:49
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BAS_IMPORT_TEMPLATE")
@Api("导入模板信息")
public class BasImportTemplate extends BaseBean{

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

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

    @Column(name="TEMPLATE_DESC")
    @ApiParam("模板描述")
    private String templateDesc;

    @Column(name="GROUP_NAME")
    @ApiParam("分组名称")
    private String groupName;

    /**
     * 10-单表，20-多表
     */
    @Column(name="IMPORT_TYPE")
    @ApiParam(value = "导入类型", example = "0")
    private Integer importType;

    /**
     *  10-全覆盖，20-差异更新，30-重复不导入
     */
    @Column(name="UPDATE_TYPE")
    @ApiParam(value = "更新类型", example = "0")
    private Integer updateType;

    @Column(name="SCRIPT_NO")
    @ApiParam("脚本编号")
    private String scriptNo;

    @Column(name="START_ROW")
    @ApiParam(value = "起始行", example = "0")
    private Integer startRow;

    @Transient
    @ApiParam("模板明细列表")
    private List<BasImportTemplateDetails> templateDetailsList;
}