package com.dbnt.kcscbackend.admin.standards.entity;

import com.dbnt.kcscbackend.config.common.BoardParams;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.time.LocalDate;

@Getter
@Setter
@Accessors(chain = true)
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "tn_api_key")
public class TnApiKey extends BoardParams {
    @Id
    @Column(name = "user_id")
    private String userId;

    @Column(name = "api_key")
    private String apiKey;

    @Column(name = "idnty_yn")
    private String idntyYn;

    @Column(name = "start_dt")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDt;

    @Column(name = "end_dt")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDt;
}
