package com.kamco.cd.kamcoback.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.Size;
import java.time.ZonedDateTime;
import java.util.UUID;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.ColumnDefault;
import org.locationtech.jts.geom.Geometry;

@Getter
@Setter
@Entity
@Table(name = "tb_map_sheet_anal_data_inference_geom")
public class MapSheetAnalDataInferenceGeomEntity {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "geo_uid")
  private Long geoUid;

  @Column(name = "cd_prob")
  private Float cdProb;

  @Size(max = 40)
  @Column(name = "class_before_cd", length = 40)
  private String classBeforeCd;

  @Column(name = "class_before_prob")
  private Float classBeforeProb;

  @Size(max = 40)
  @Column(name = "class_after_cd", length = 40)
  private String classAfterCd;

  @Column(name = "class_after_prob")
  private Float classAfterProb;

  @Column(name = "map_sheet_num")
  private Long mapSheetNum;

  @Column(name = "compare_yyyy")
  private Integer compareYyyy;

  @Column(name = "target_yyyy")
  private Integer targetYyyy;

  @Column(name = "area")
  private Float area;

  @Size(max = 100)
  @Column(name = "geo_type", length = 100)
  private String geoType;

  @Column(name = "data_uid")
  private Long dataUid;

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

  @Column(name = "created_uid")
  private Long createdUid;

  @ColumnDefault("now()")
  @Column(name = "updated_dttm")
  private ZonedDateTime updatedDttm;

  @Column(name = "updated_uid")
  private Long updatedUid;

  @ColumnDefault("0")
  @Column(name = "geom_cnt")
  private Long geomCnt;

  @ColumnDefault("0")
  @Column(name = "pnu")
  private Long pnu;

  @Size(max = 20)
  @ColumnDefault("'0'")
  @Column(name = "fit_state", length = 20)
  private String fitState;

  @ColumnDefault("now()")
  @Column(name = "fit_state_dttm")
  private ZonedDateTime fitStateDttm;

  @Column(name = "labeler_uid")
  private Long labelerUid;

  @Size(max = 20)
  @ColumnDefault("'0'")
  @Column(name = "label_state", length = 20)
  private String labelState;

  @ColumnDefault("now()")
  @Column(name = "label_state_dttm")
  private ZonedDateTime labelStateDttm;

  @Column(name = "tester_uid")
  private Long testerUid;

  @Size(max = 20)
  @ColumnDefault("'0'")
  @Column(name = "test_state", length = 20)
  private String testState;

  @ColumnDefault("now()")
  @Column(name = "test_state_dttm")
  private ZonedDateTime testStateDttm;

  @Column(name = "fit_state_cmmnt", length = Integer.MAX_VALUE)
  private String fitStateCmmnt;

  @Column(name = "ref_map_sheet_num")
  private Long refMapSheetNum;

  @ColumnDefault("uuid_generate_v4()")
  @Column(name = "uuid")
  private UUID uuid;

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

  @Column(name = "map_5k_id")
  private Long map5kId;

  @Column(name = "file_created_yn")
  private Boolean fileCreatedYn;

  @Column(name = "geom", columnDefinition = "geometry")
  private Geometry geom;

  @Column(name = "geom_center", columnDefinition = "geometry")
  private Geometry geomCenter;

  @Column(name = "before_geom", columnDefinition = "geometry")
  private Geometry beforeGeom;

  @Column(name = "file_created_dttm")
  private ZonedDateTime fileCreatedDttm;

  @Column(name = "pass_yn")
  private Boolean passYn;

  @Column(name = "pass_yn_dttm")
  private ZonedDateTime passYnDttm;
}
