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.*;
import java.io.Serializable;

/**
 * @author yumingxing
 * @version 1.0
 * @date 2021/1/29 13:58
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_OQC_CHECK_DETAIL", indexes = {
        @Index(columnList = "WORK_TIME,PART_NO"),
        @Index(columnList = "OQC_NO"),
        @Index(columnList = "WORK_CENTER_CODE"),
        @Index(columnList = "PART_NO"),
        @Index(columnList = "WORK_TIME"),
        @Index(columnList = "ORDER_NO")
})
@Api("MES_出货检验单明细表")
public class MesOqcCheckDetail extends BaseBean implements Serializable {
    private static final long serialVersionUID = -3651085188475619768L;

    @Column(
            name = "SEQ",
            columnDefinition = "decimal(18,8)"
    )
    @ColumnDefault("0")
    @ApiParam("序号")
    private Double seq;

    @Column(name = "OQC_NO")
    @ApiParam("检验单号")
    private String oqcNo;

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

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

    @Lob
    @Column(name = "STANDARD")
    @ApiParam("判断基准")
    private String standard;

    @Column(name = "APPLIANCE")
    @ApiParam("启用器具")
    private String appliance;

    @Column(name = "CHECK_VALUE")
    @ApiParam("检验值")
    private String checkValue;

    @Column(name = "REMARK")
    @ApiParam("备注")
    private String remark;

    @Column(name = "RESULT")
    @ApiParam("检验结果")
    private Integer result;

    @Lob
    @Column(name = "OQC_PROJECT")
    @ApiParam("检验项目")
    private String oqcProject;

    @Column(name = "UP_LIMIT")
    @ApiParam("上限值")
    private String upLimit;

    @Column(name = "DOWN_LIMT")
    @ApiParam("下限值")
    private String downLimit;

    @Column(name = "ORDER_NO")
    @ApiParam("工单号")
    private String orderNo;

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

    @Column(name = "PID")
    @ApiParam("检验项目ID")
    public Long pid;

    @Column(name = "WORK_TIME")
    @ApiParam("生产日期")
    private String workTime;

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

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

}
