package com.zioinfo.mes.shipping;

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

/**
 * 출하 (mes_shipping) — 출하지시·피킹/패킹·출하검사·출하실적·납품서/거래명세서.
 *
 * <p>상태: ORDERED → PICKING → PACKING → (INSPECTED) → SHIPPED (CANCELLED 가능).
 * SHIPPED 시 재고 감소(ISSUE/SHIP 수불) + 납품서/거래명세서 번호 발번.
 */
@Data
public class MesShipping {
    private Long id;
    private String shippingNo;
    private String partnerCode;        // 고객
    private String orderRef;           // 주문/수주 참조
    private String itemCode;
    private String itemName;           // 조인 표시(비영속)
    private String lotNo;
    private Double planQty;
    private Double pickedQty;
    private Double packedQty;
    private Double shippedQty;
    private String warehouseCode;
    private String locationCode;
    private String status;             // ORDERED/PICKING/PACKING/INSPECTED/SHIPPED/CANCELLED
    private Boolean inspectionRequired;
    private String inspectionResult;   // PASS/FAIL
    private String deliveryNo;         // 납품서 번호
    private String statementNo;        // 거래명세서 번호
    private LocalDate shipDate;
    private String remark;
    private String createdBy;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
}
