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 : yerik.shi
 * @CreateDate : 2019-06-11
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_LINE_LOCATE_PART")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="线边库物料信息",description = "线边库物料信息")
@Deprecated
public class WmsLineLocatePart extends BaseBean {

    private static final long serialVersionUID = -3234516001954145902L;
    @Column(name="LOCATE_NO")
    @ApiParam(value ="库位代码")
    private String locateNo;

    @Column(name="PART_NO")
    @ApiParam(value = "物料编码")
    private String partNo;

    @Column(name="PART_NAME_RDD")
    @ApiParam(value = "物料名称")
    private String partNameRdd;

    public Double getPullQty() {
        return pullQty == null ? 0D : this.pullQty.doubleValue();
    }

    public Double getMax() {
        return max== null ? 0D : this.max.doubleValue();
    }

    public Double getMin() {
        return min== null ? 0D : this.min.doubleValue();
    }

    public Integer getIsGeneratePicklist() {
        return isGeneratePicklist== null ? 0: this.isGeneratePicklist.intValue();
    }

    @Column(name = "PULL_QTY", columnDefinition = "decimal(18,8)")
    @ApiParam(value = "拉动数量")
    private Double pullQty;

    @Column(name = "Max", columnDefinition = "decimal(18,8)")
    @ApiParam(value = "最大值")
    private Double max;

    @Column(name = "Min", columnDefinition = "decimal(18,8)")
    @ApiParam(value = "最小值")
    private Double min;

    @Column(name = "IS_GENERATE_PICKLIST")
    @ApiParam(value = "是否生成领料单")
    private Integer isGeneratePicklist;

}
