package com.zioinfo.mes.inspection;

import lombok.Data;
import java.time.LocalDateTime;

/**
 * 검사 (mes_inspection) — IQC(수입)/IPQC(공정)/OQC(출하) 검사 + 측정값(JSONB) + 합/불 판정.
 *
 * <p>result: PENDING → PASS / FAIL.
 */
@Data
public class MesInspection {
    private Long id;
    private String inspectionNo;
    private String inspectionType;   // IQC/IPQC/OQC
    private String itemCode;
    private String lotNo;
    private String refType;          // RECEIVING/WORKORDER/SHIPPING
    private String refNo;
    private String specCode;
    private Integer sampleSize;
    private String measurements;     // JSONB 문자열 [{characteristic, measured, lsl, usl, judge}]
    private String result;           // PENDING/PASS/FAIL
    private Double defectQty;
    private String inspector;
    private String remark;
    private String createdBy;
    private LocalDateTime createdAt;
}
