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

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

/**
 * @Description : WMS字段信息表
 * @Reference :
 * @Author : sjc
 * @CreateDate : 2020-01-07 09:06
 * @Modify:
 **/
@Data
@Entity
@Table(name = "WMS_FIELDINFO",
        indexes = {
        @Index(columnList = "FIELD_NAME"),
        @Index(columnList = "ENTITY_NAME")},
        uniqueConstraints = {
        @UniqueConstraint(columnNames = {
                "FIELD_NAME", "ENTITY_NAME"})}
)
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "WMS字段信息表", description = "WMS字段信息表")
public class WmsFieldInfo extends BaseBean {

    private static final long serialVersionUID = 3903166651913139064L;

    @Column(name = "FIELD_NAME")
    @ApiParam(value = "字段名称")
    private String fieldName;

    @Column(name = "FIELD_DESC")
    @ApiParam(value = "字段描述")
    private String fieldDesc;

    @Column(name = "FIELD_TYPE")
    @ApiParam(value = "字段类型")
    private Integer fieldType;

    @Column(name = "ENUM_NAME")
    @ApiParam(value = "字段枚举名称")
    private String enumName;

    @Column(name = "ENTITY_NAME")
    @ApiParam(value = "实体名称")
    private String entityName;

    @Column(name = "ENTITY_DESC")
    @ApiParam(value = "实体描述")
    private String entityDesc;

    @Column(name = "SEQ")
    @ApiParam(value = "序列号:字段标题排序使用默认0（不排序）")
    private Integer seq;

    @Column(name = "IS_REQUIRE")
    @ApiParam(value = "是否必选:默认1-必选，2-非必选")
    private Integer isRequire;

    @Column(name = "WIDTH", columnDefinition = "decimal(18,8)")
    @ApiParam(value = "宽度", example = "0")
    private Double width;

    @Column(name = "SORT")
    @ApiParam(value = "排序规则:默认0-不排序，1-升序2-降序")
    private Integer sort;

    @Column(name = "IS_WIDER")
    @ApiParam(value = "是否加粗:默认1-加粗，2-非加粗")
    private Integer isWider;

    @Column(name = "IS_QUERY")
    @ApiParam(value = "是否可选作查询条件:默认1-可选，2-不可选")
    private Integer isQuery;

    @Column(name = "IS_SELECT")
    @ApiParam(value = "是否勾选:默认1-勾选，2-非勾选")
    private Integer isSelect;

    @Column(name = "IS_SHOW")
    @ApiParam(value = "是否表单字段展示:默认1-显示，2-隐藏")
    private Integer isShow;

    @Column(name = "CONDITION_EXPRE")
    @ApiParam(value = "条件表达式:>,<,>=等")
    private String conditionExpre;

    @Column(name = "CONDITION_CONNECTOR")
    @ApiParam(value = "条件连接符:and/or")
    private String conditionConnector;

    @Column(name = "LIST_COLUMN_NAME")
    @ApiParam(value = "开窗列表显示列名称")
    private String listColumnName;

    @Column(name = "SEARCH_COLUMN_NAME")
    @ApiParam(value = "开窗搜索列名称")
    private String searchColumnName;

    @Column(name = "EXPLICIT_COLUMN_NAME")
    @ApiParam(value = "回显列名")
    private String explicitColumnName;

    @Column(name = "IS_MULTIPLE")
    @ApiParam(value = "是否多选")
    private Integer isMultiple;

    @Column(name = "DATA_SRC")
    @ApiParam(value = "数据来源")
    private String dataSrc;

    @Column(name = "GET_VAL_WAY")
    @ApiParam(value = "下拉框规则")
    private Integer getValWay;
}
