package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor;

import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoFile;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat;
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "sailor")
public class Sailor extends SailorBaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "sailor_key")
    private Integer sailorKey;

    @Column(name = "fb_key")
    private Integer fbKey;

    @Transient
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updDt;
    @Transient
    private Integer cdsKey;
    @Transient
    private CrackdownStatus crackdownStatus;
    @Transient
    private FishingBoat fishingBoat;
    @Transient
    private List<FishingBoat> fishingBoatList;
    @Transient
    private List<Violation> violationList;

    @Transient
    private String year;
    @Transient
    private String crackdownPolice;
    @Transient
    private String crackdownBoat;
    @Transient
    private String boatNameKr;
    @Transient
    private LocalDateTime napoDt;

    @Transient
    private List<CaptinPhotoFile> fileList;
}
