package com.kamco.cd.training.postgres.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import java.time.OffsetDateTime;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.ColumnDefault;

@Getter
@Setter
@Entity
@Table(name = "tb_model_test_training_run")
public class ModelTestTrainingRunEntity {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "tsr_id", nullable = false)
  private Long id;

  @NotNull
  @Column(name = "model_id", nullable = false)
  private Long modelId;

  @Column(name = "attempt_no")
  private Integer attemptNo;

  @Column(name = "job_id")
  private Long jobId;

  @Column(name = "epoch")
  private Integer epoch;

  @ColumnDefault("now()")
  @Column(name = "created_dttm")
  private OffsetDateTime createdDttm;
}
