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.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description : 库存交易条码信息（移库类的交易需要记录2笔交易数据，正负各一笔）
 * @Reference :
 * @Author : silliter.yuan
 * @CreateDate : 2018-11-06 15:58
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_TRANS_SN")
@Api("库存交易条码信息")
public class WmsTransSn extends BaseBean {

    private static final long serialVersionUID = -5303085479813153054L;
    @Column(name="WH_NO")
    @ApiParam("仓库代码")
    public String whNo;

    @Column(name="ZONE_NO")
    @ApiParam("存储区编号")
    public String zoneNo;

    @Column(name="LOCATE_NO")
    @ApiParam("库位编号")
    public String locateNo;

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

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

    @Column(name="SN")
    @ApiParam("条码")
    public String sn;

    @Column(name="PACKAGE_NO")
    @ApiParam("容器编号")
    public String packageNo;

    @Column(name="UNIT")
    @ApiParam("单位")
    public String unit;

    @Column(name="TRANS_CODE")
    @ApiParam("事务代码")
    public String transCode;

    @Column(name="QTY", columnDefinition = "decimal(18,8)", nullable = false)
    @ColumnDefault("0")
    @ApiParam(value = "交易数量", example = "0")
    public Double qty;

    @Column(name="REJECT_QTY", columnDefinition = "decimal(18,8)", nullable = false)
    @ColumnDefault("0")
    @ApiParam(value = "不合格交易数量", example = "0")
    public Double rejectQty;

    @Column(name="TRANS_NO")
    @ApiParam("事务编号")
    public String transNo;

    @Column(name = "QC_STATUS")
    @ApiParam(value = "质检状态", example = "0")
    private Integer qcStatus;

    @Column(name = "SN_STATUS")
    @ApiParam(value = "条码状态", example = "0")
    private Integer snStatus;
}
