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

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-03-25 10:10
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_WAVE_RULE_DETAILS")
@Api(value = "波次规则明细数据表")
public class WmsWaveRuleDetails extends BaseBean {

    private static final long serialVersionUID = 8664373954844368961L;

    @Column(name = "RULE_ID")
    @ApiParam(value = "波次规则编号", example = "0")
    public Long ruleId;

    @Column(name = "FIELD_CH_NAME")
    @ApiParam(value = "字段中文名称")
    public String fieldChName;

    @Column(name = "FIELD_EN_NAME")
    @ApiParam(value = "字段英文名称")
    public String fieldEnName;

    @Column(name = "MERGE_OPERATOR_TYPE")
    @ApiParam(value = "合并操作类型", example = "0")
    public Integer mergeOperatorType;

    @Column(name = "FILED_VALUE")
    @ApiParam(value = "字段值")
    public String fieldValue;

    @Column(name = "ENTITY_NAME")
    @ApiParam(value = "实例类名")
    public String entityName;

    @Column(name = "LIST_COLUMN_NAME")
    @ApiParam(value = "列表列名")
    public String listColumnName;

    @Column(name = "SEARCH_COLUMN_NAME")
    @ApiParam(value = "搜索列名")
    public String searchColumnName;

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

    public Long getRuleId() {
        return ruleId == null ? 0L : ruleId.longValue();
    }
}
