package cn.estsh.i3plus.pojo.mes.pcn.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;
import java.util.List;

/**
 * @Description:
 * @Reference:
 * @Author: joke.wang
 * @CreateDate: 2019\10\12 16:33
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QC_CHECK_DATA", indexes = {
        @Index(columnList = "CREATE_DATE_TIME"),
        @Index(columnList = "SN")
})
@Api("质量过程检测数据")
public class MesQcCheckData extends BaseBean implements Serializable {

    private static final long serialVersionUID = 3600528549583720850L;
    @Column(name = "CHECK_ID")
    @ApiParam("检测id")
    private String checkId;

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

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("工作中心代码")
    private String workCenterCode;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工作单元代码")
    private String workCellCode;

    @Column(name = "CHECK_TYPE")
    @ApiParam("检测类型")
    private Integer checkType;

    @Column(name = "CHECK_ITEM")
    @ApiParam("检测项")
    private String checkItem;

    @Column(name = "CHECK_STANDARD")
    @ApiParam("检测标准")
    private String checkStandard;

    @Column(name = "CHECK_GUIDE")
    @ApiParam("检测指导")
    private String checkGuide;

    @Column(name = "CHECK_FREQUENCY")
    @ApiParam("频率")
    private String checkFrequency;

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

    @Column(name = "CHECK_RESULT")
    @ApiParam("判定结果")
    private String checkResult;

    @Column(name = "SN")
    @ApiParam("产品条码")
    private String sn;

    @Column(name = "QTY")
    @ApiParam("产品数量")
    private Integer qty;

    @Column(name = "MEMO")
    @ApiParam("备注")
    private String memo;

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

    @Column(name = "CUST_CODE")
    @ApiParam("客户代码")
    private String custCode;

    @Transient
    @ApiParam("产品条码")
    private String serialNumber;

    @Transient
    @ApiParam("过程质量检测数据")
    private List<MesQcCheckStandard> mesQcCheckStandardList;

}
