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;
import javax.persistence.Transient;

/**
 * @Description :
 * @Reference :
 * @Author : jack.lv
 * @CreateDate : 2019-04-01 11:21
 * @Modify:
 **/
@Data
@Table(name = "SWEB_PURCHASE_ORDER_SN")
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api("采购订单表-条码明细表")
public class SwebPurchaseOrderSn extends BaseBean {

    private static final long serialVersionUID = 2226619667893717305L;
    @Column(name = "ORDER_NO")
    @ApiParam("单据明细编号")
    private String orderNo;

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

    @ApiParam("供应商名称")
    @Column(name = "VENDOR_NAME")
    private String vendorName;

    @Column(name = "PART_NO")
    @ApiParam(value = "零件号")
    private String partNo;

    @Column(name = "PART_NAME")
    @ApiParam(value = "零件名称")
    private String partName;

    @ApiParam("零件类型")
    @Column(name = "PART_TYPE")
    private Integer partType;

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

    @Column(name = "SN_STATUS")
    @ApiParam(value = "SN状态", example = "1")
    private Integer snStatus;

    @Column(name = "BOX_QTY")
    @ColumnDefault("0")
    @ApiParam(value = "箱数", example = "0")
    private Integer boxQty;

    @Column(name = "SERIAL_NO")
    @ApiParam(value = "序列号")
    private Integer serialNo;

    @Column(name = "SN")
    @ApiParam(value = "箱条码")
    private String sn;

    @Column(name = "ERP_WAREHOUSE")
    @ApiParam("库存地")
    private String erpWarehouse;

    @Column(name = "PRODUCTION_TIME")
    @ApiParam(value = "产生时间")
    private String productionTime;

    @Column(name = "PRINT_TIME")
    @ApiParam(value = "打印时间")
    private String printTime;

    @Column(name = "PRINTS")
    @ApiParam("打印次数")
    private Integer prints;

    @Column(name = "CHECK_CODE")
    @ApiParam(value = "检验编号")
    private String checkCode;

    @Column(name = "STOVE_NO")
    @ApiParam(value = "特殊批号")
    private String stoveNo;

    @Column(name = "BATCH_NO")
    @ApiParam(value = "批次号")
    private String batchNo;

    @ApiParam("是否同步")
    @Column(name = "IS_SYN")
    private String isSyn;

    @Column(name = "REC_TIME")
    @ApiParam(value = "收货时间")
    private String recTime;

    @Column(name = "PACKAGE_NO")
    @ApiParam(value = "包装编号")
    private String packageNo;

    @ColumnDefault("0")
    @Column(name = "WEIGHT")
    @ApiParam(value = "重量")
    private Double weight;

    @Column(name = "VEN_PRODUCT_TIME")
    @ApiParam(value = "供应商生产日期")
    private String venProductTime;

    @Column(name = "EXPECTED_TIME")
    @ApiParam(value = "预计交货时间")
    private String expectedTime;

    @Transient
    @ApiParam(value = "合同号")
    private String refNo;

    @Transient
    @ApiParam(value = "是否可编辑（前端使用）")
    private boolean isSet = false;
}
