package cn.estsh.i3plus.pojo.sweb.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 :
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2020-05-28
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "SWEB_PO_TO_WMS")
@Api("库存移动单处理成功后的记录")
public class SwebPoToWms extends BaseBean {

    private static final long serialVersionUID = -3999194389200855165L;
    @Column(name = "ORDER_NO")
    @ApiParam("单号")
    public String orderNo;

    @Column(name = "VERSION")
    @ApiParam("版本")
    public String version;

    @Column(name = "ITEM")
    @ApiParam("行号")
    private Integer item;

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

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

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

    @Column(name = "VENDOR_NO")
    @ApiParam("供应商")
    private String vendorNo;

    @Column(name = "PRINT_QTY", columnDefinition = "decimal(18,8)", nullable = false)
    @ColumnDefault("0")
    @ApiParam(value = "条码打印数量", example = "0")
    private Double printQty;

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

    @Column(name = "PLAN_DATE")
    @ApiParam("计划交货日期")
    private String planDate;

    @Column(name = "PLAN_TIME")
    @ApiParam("计划交货时间")
    private String planTime;

    @Column(name = "ERP_AREA_NO")
    @ApiParam("默认收货库存地")
    private String erpAreaNo;

    @Column(name = "SNP", columnDefinition = "decimal(18,8)")
    @ApiParam("标准包装")
    private Double snp;

    /**
     * 状态:1=创建,10=待处理,20=已处理
     */
    @Column(name="ITEM_STATUS")
    @ApiParam(value = "状态", example = "0")
    public Integer itemStatus;

    @Column(name = "SYNC_STATUS")
    @ApiParam("同步状态")
    private Integer syncStatus;
}
