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 :
 * @Reference :
 * @Author : amy
 * @CreateDate : 2019-06-28 15:12
 * @Modify:
 **/
@Data
@Entity
@Table(name = "AMP_JIS_REC")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "AMP_JIS收货", description = "AMP_JIS收货")
public class AmpJisRec extends BaseBean {

    private static final long serialVersionUID = 4460727160153551089L;
    @Column(name = "ORDER_NO", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("JIS单号")
    public String orderNo;

    @Column(name = "PART_NO", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("物料编码")
    public String partNo;

    @Column(name = "PART_NAME_RDD", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("物料名称")
    public String partNameRdd;

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

    @Column(name = "UNIT", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("单位")
    public String unit;

    @Column(name = "SN", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("条码")
    public String sn;

    /**
     * 状态:10=新建,20=已处理,30=处理出错
     */
    @Column(name = "ORDER_STATUS", columnDefinition = "int default 0", nullable = false)
    @ApiParam(value = "状态", example = "10")
    public Integer orderStatus;

    @Column(name = "VENDOR_NO", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam(value = "供应商编码", example = "10")
    public String vendorNo;

    @Column(name = "REMARK", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("备注")
    public String remark;

    @Column(name = "SRC", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("单据来源")
    public String src;

    @Column(name = "SHIPPING_FLAG", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("特殊发货标志")
    public String shippingFlag;

    @Column(name = "ERROR_MESSAGE", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("错误信息")
    public String errorMessage;

    @Column(name = "AREA_NO", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("ERP库存地")
    public String areaNo;

    @Column(name = "CAR_NO", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("车号")
    public String carNo;

    @Column(name = "VIN", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("VIN号")
    public String vin;

    @Column(name = "SHIPPING_TIME", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("发运时间")
    public String shippingTime;

    @Column(name = "SID", columnDefinition = "varchar(225) default ''", nullable = false)
    @ApiParam("sid")
    public String sid;

    @Column(name = "IS_LOCK", columnDefinition = "int default 0", nullable = false)
    @ApiParam("是否锁定 是否锁定：1=锁定 2=未锁定")
    public Integer isLock;

    @Column(name = "ERP_SYNC_FLAG", columnDefinition = "int default 0", nullable = false)
    @ApiParam("ERP同步标识 ERP同步标识：10=待同步，20=同步成功，30=同步失败")
    public Integer erpSyncFlag;

    public AmpJisRec(Long id, String partNo, String partNameRdd, String vendorNo, Double qty, String unit) {
        this.id = id;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.vendorNo = vendorNo;
        this.qty = qty;
        this.unit = unit;
    }

    public AmpJisRec() {

    }
}
