package com.zioinfo.mes.oee;

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

/**
 * OEE 일일 기록 (mes_oee) — 설비/일자별 가동·성능·품질 입력값.
 *
 * <p>OEE = Availability × Performance × Quality.
 * Availability = runTime / plannedTime
 * Performance  = (idealCycleMin × totalCount) / runTime
 * Quality      = goodCount / totalCount
 */
@Data
public class MesOeeRecord {
    private Long id;
    private String equipmentCode;
    private LocalDate recordDate;
    private Double plannedTimeMin;   // 계획 가동시간
    private Double runTimeMin;       // 실제 가동시간
    private Double downtimeMin;      // 비가동시간
    private String downtimeCode;     // 비가동 코드
    private Double idealCycleMin;    // 이상 사이클타임(분/개)
    private Double totalCount;       // 총 생산수
    private Double goodCount;        // 양품수
    private String createdBy;
    private LocalDateTime createdAt;
}
