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

/**
 * @Description:
 * @Author: wangjie
 * @Date: 2021/01/14 20:03
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PART_DIVULGE_CHECK_RECORD", indexes = {
        @Index(columnList = "PART_NO"),
        @Index(columnList = "SERIAL_NUMBER"),
        @Index(columnList = "PACKAGE_NO"),
        @Index(columnList = "WORK_ORDER_NO"),
        @Index(columnList = "OPERATOR"),
        @Index(columnList = "OUT_WC_TIME"),
        @Index(columnList = "CHECK_TIME"),
        @Index(columnList = "LOT_NO")
})
@Api("MES_EP_24小时泄露检测记录表")
public class MesPartDivulgeCheckRecord extends BaseBean implements Serializable {

    private static final long serialVersionUID = -7969130387301385762L;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam(value = "系统同步标志")
    public Integer systemSyncStatus = 2;

    @Column(name = "SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam(value = "WMS系统同步标志")
    public Integer syncStatus = 2;

    @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 = "PACKAGE_NO")
    @ApiParam("包装条码")
    private String packageNo;

    @Column(name = "WORK_ORDER_NO")
    @ApiParam("生产工单号")
    private String workOrderNo;

    @Column(name = "OPERATOR")
    @ApiParam("操作人")
    private String operator;

    @Column(name = "CHECK_RESULT")
    @ApiParam("检测结果 10-OK，20-NG")
    private Integer checkResult;

    @Column(name = "DIVULGE_VALUE", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("泄露值")
    private Double divulgeValue;

    @Column(name = "OUT_WC_TIME")
    @ApiParam("下线时间")
    private String outWorkCenterTime;

    @Column(name = "CHECK_TIME")
    @ApiParam("检测时间")
    private String checkTime;

    @Column(name = "WORK_TIME")
    @ApiParam("作业时间")
    private String workTime;

    @Column(name = "SHFIT_CODE")
    @ApiParam("班次")
    private String shiftCode;

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


}
