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 : siliter.yuan
 * @CreateDate : 2020-01-07 09:06
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_SEARCHELEMENT", indexes = {
        @Index(columnList = "FIELD_NAME"),
        @Index(columnList = "FIELD_TYPE"),
        @Index(columnList = "SEARCH_NAME"),
        @Index(columnList = "USER_CODE")
})
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="WMS搜索元素表",description = "WMS搜索元素表")
public class WmsSearchElement extends BaseBean {

    private static final long serialVersionUID = 3903166651913139062L;

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

    @Column(name = "TITLE_NAME")
    @ApiParam(value = "标题名称")
    private String titleName;

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

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

    @Column(name = "VALUE")
    @ApiParam(value = "检索值")
    private String value;

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

    @Column(name = "SEARCH_NAME")
    @ApiParam(value = "搜索名称")
    private String searchName;

    @Column(name = "USER_CODE")
    @ApiParam(value = "用户编号")
    private String userCode;

    /**
     * 搜索组名称
     */
    private String groupName;

    /**
     * 搜索组连接符
     */
    private String groupConnector;

    /**
     * 开始时间字符串
     */
    private String startDateTimeStr;

    /**
     * 结束时间字符串
     */
    private String endDateTimeStr;
}
