package com.dbnt.faisp.main.faStatistics.internationalCrimeArrest.model;

import com.dbnt.faisp.config.BaseModel;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;

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

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "suspect_person_info")
public class SuspectPersonInfo extends BaseModel {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "spi_key")
    private Integer spiKey;
    @Column(name = "ica_key")
    private Integer icaKey;
    @Column(name = "sex")
    private String sex;
    @Column(name = "age")
    private String age;
    @Column(name = "country")
    private String country;
    @Column(name = "stay_qualification")
    private String stayQualification;
    @Column(name = "stay_period_expired_dt")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime stayPeriodExpiredDt;
    @Column(name = "entry_visa")
    private String entryVisa;

    @Transient
    private List<Integer> icaKeyList;
    @Transient
    private List<Integer> spiKeyList;
    @Transient
    private String countryEtc;
}
