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

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Author: Wynne.Lu
 * @CreateDate: 2019/10/18 2:55 下午
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PACKAGE_DETAIL", indexes = {
        @Index(columnList = "PACKAGE_NO"),
        @Index(columnList = "SERIAL_NUMBER"),
        @Index(columnList = "PART_NO"),
        @Index(columnList = "PACKAGE_NO2"),
        @Index(columnList = "ORGANIZE_CODE,PACKAGE_NO,SERIAL_NUMBER"),
        @Index(columnList = "PACKAGE_NO,SERIAL_NUMBER")
})
@Api("包装规格明细")
public class MesPackageDetail extends BaseBean implements Serializable {
    private static final long serialVersionUID = 6980459490465566975L;

    @Column(name = "PACKAGE_NO", nullable = false)
    @ApiParam("包装编码")
    private String packageNo;

    @Column(name = "CT_LOCATION_NO")
    @ApiParam("容器位置编号")
    private String ctLocationNo;

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

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

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

    @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;

    @Transient
    @ApiParam("批次")
    private String lotNo;



}
