package com.dbnt.kcscbackend.file.entity;

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.LocalDateTime;


@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "tn_attach_file")
public class TnAttachFile {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "file_seq")
  private Integer fileSeq;
  @Column(name = "file_grp_id")
  private String fileGrpId;
  @Column(name = "file_order")
  private Integer fileOrder;
  @Column(name = "file_old_name")
  private String fileOldName;
  @Column(name = "file_new_name")
  private String fileNewName;
  @Column(name = "file_path")
  private String filePath;
  @Column(name = "file_size")
  private Integer fileSize;
  @Column(name = "file_ext")
  private String fileExt;
  @Column(name = "down_cnt")
  private Integer downCnt;
  @Column(name = "frst_crt_id")
  private String frstCrtId;
  @Column(name = "frst_crt_dt")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime frstCrtDt;
  @Column(name = "last_chg_id")
  private String lastChgId;
  @Column(name = "last_chg_dt")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime lastChgDt;
  @Column(name = "use_yn")
  private String useYn;
  @Column(name = "old_seq")
  private Integer oldSeq;

  @Transient
  private String kcscCd;

}
