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

import jakarta.persistence.*;
import java.time.ZonedDateTime;
import java.util.UUID;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.ColumnDefault;

@Getter
@Setter
@Table(name = "imagery")
@Entity
public class ImageryEntity {
  @Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "imagery_id_seq_gen")
  @SequenceGenerator(
      name = "imagery_id_seq_gen",
      sequenceName = "imagery_id_seq",
      allocationSize = 1)
  @Column(name = "id", nullable = false)
  private Long id;

  @Column(name = "uuid", columnDefinition = "uuid default gen_random_uuid()")
  private UUID uuid;

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

  @Column(name = "scene_50k")
  private String scene50k;

  @Column(name = "scene_5k")
  private String scene5k;

  @Column(name = "scene_id_50k")
  private Integer sceneId50k;

  @Column(name = "scene_id_5k")
  private Integer sceneId5k;

  @ColumnDefault("now()")
  @Column(name = "created_date", columnDefinition = "TIMESTAMP WITH TIME ZONE DEFAULT now()")
  private ZonedDateTime createdDate;

  @Column(name = "middle_path")
  private String middlePath;

  @Column(name = "cog_middle_path")
  private String cogMiddlePath;

  @Column(name = "filename")
  private String filename;

  @Column(name = "cog_filename")
  private String cogFilename;
}
