package cn.estsh.i3plus.pojo.mes.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.Lob;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description:
 * @Reference:
 * @Author: joke.wang
 * @CreateDate: 2019\11\15 10:01
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "IF_PACKAGE_DETAIL")
@Api("包装明细表")
public class IfPackageDetail extends BaseBean  implements Serializable {

    private static final long serialVersionUID = -5412635747424111476L;
    @Column(name = "PART_NO")
    @ApiParam("物料号")
    private String partNo;

    @Column(name = "PART_NAME")
    @ApiParam("物料名称")
    private String partName;

    @Column(name = "SERIAL_NUMBER")
    @ApiParam("过程条码")
    private String serialNumber;

    @Column(name = "PRODUCT_SN")
    @ApiParam("产品条码")
    private String productSn;

    @Column(name = "PACKAGE_NO")
    @ApiParam("包装条码")
    private String packageNo;

    @Column(name = "LOT_NO")
    @ApiParam("包装批次")
    private String lotNo;

    @Column(name = "QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("数量")
    private Double qty;

    @Column(name = "PACKAGE_NO2")
    @ApiParam("包装编号2")
    private String packageNo2;

    @Column(name = "PACKAGE_NO3")
    @ApiParam("包装编号3")
    private String packageNo3;

    @Column(name = "PACKAGE_NO4")
    @ApiParam("包装编号4")
    private String packageNo4;

    @Column(name = "ACTION_USER")
    @ApiParam("操作人")
    private String actionUser;

    @Column(name = "ACTION_DATE_TIME")
    @ApiParam("操作时间")
    private String actionDateTime;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线")
    private String workCenterCode;

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

    @Column(name = "ERROR_MESSAGE")
    @ApiParam("异常消息")
    @Lob
    private String errorMessage;

    @Column(name = "ACTION_CODE")
    @ApiParam("动作代码")
    private String actionCode;

    @Column(name = "IF_CODE")
    @ApiParam("接口代码")
    private String ifCode;

    @Column(name = "CT_NO")
    @ApiParam("容器编号")
    private String ctNo;

    @Column(name = "SAMPLE_TYPE")
    @ApiParam("条码类型")
    private String sampleType;

    @Column(name = "CUST_DELIVERY_LOCATION")
    @ApiParam("客户发往地")
    private String custDeliveryLocation;

    @Column(name = "CUSTOMER_CODE")
    @ApiParam("客户代码")
    private String customerCode;
}
