package com.zioinfo.mes.ncr;

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

/**
 * 부적합 보고 (mes_ncr) — Non-Conformance Report. 검사 불합격·불량 발생 시 기록.
 *
 * <p>status: OPEN → REVIEW → DISPOSITIONED → CLOSED. disposition: USE_AS_IS/REWORK/SCRAP/RETURN.
 */
@Data
public class MesNcr {
    private Long id;
    private String ncrNo;
    private String itemCode;
    private String lotNo;
    private String refType;          // INSPECTION/WORKORDER/RECEIVING/SHIPPING
    private String refNo;
    private String defectCode;
    private Double defectQty;
    private String description;
    private String disposition;      // USE_AS_IS/REWORK/SCRAP/RETURN
    private String severity;         // MINOR/MAJOR/CRITICAL
    private String status;           // OPEN/REVIEW/DISPOSITIONED/CLOSED
    private Long capaId;
    private String createdBy;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
}
