package kr.re.etri.autoflow.entity; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.*; import lombok.*; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.LocalDateTime; @Entity @EntityListeners(AuditingEntityListener.class) @Table(name = "tb_experiments") @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder @Schema(description = "Kubeflow 및 MLflow Experiment 엔티티") public class ExperimentsEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Schema(description = "DB PK") private Long id; @Schema(description = "Kubeflow / MLflow Experiment ID") private String kubeFlowId; @Schema(description = "Kubeflow / MLflow Experiment ID") private String mlFlowId; @Schema(description = "Experiment 이름 / Kubeflow: name, MLflow: name") private String name; @Schema(description = "Experiment 표시 이름 / Kubeflow: display_name, MLflow: name or display_name") private String displayName; @Schema(description = "Experiment 설명 / Kubeflow: description, MLflow: optional description") private String description; @Schema(description = "MLflow Artifact 경로 / Kubeflow에는 해당 없음") private String artifactLocation; @Schema(description = "MLflow 상태 / lifecycle_stage, Kubeflow에는 해당 없음") private String lifecycleStage; @Schema(description = "Kubeflow 저장 상태 / storage_state, MLflow에는 해당 없음") private String storageState; @CreatedDate @Schema(description = "Experiment 생성 일시 / Kubeflow: ISO 8601 created_at, MLflow: timestamp(ms) → LocalDateTime") private LocalDateTime kubeflowCreatedAt; @CreatedDate @Schema(description = "Experiment 생성 일시 / Kubeflow: ISO 8601 created_at, MLflow: timestamp(ms) → LocalDateTime") private LocalDateTime mlflowCreatedAt; @LastModifiedDate @Schema(description = "Experiment 마지막 업데이트 일시 / MLflow: last_update_time(ms) → LocalDateTime, Kubeflow에는 해당 없음") private LocalDateTime lastUpdateTime; @Schema(description = "Kubeflow 마지막 Run 생성 일시 / last_run_created_at") private LocalDateTime lastRunCreatedAt; @Schema(description = "등록자 ID") private String regUserId; @Schema(description = "프로젝트 ID / nullable 아님") @Column(nullable = false) private Long projectId; }