package com.dbnt.kcscbackend.standardCode.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "tn_document_info")
public class TnDocumentInfo {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "doc_info_seq")
  private int docInfoSeq;
  @Column(name = "group_seq", nullable = false)
  private int groupSeq;
  @Column(name = "kcsc_cd")
  private String kcscCd;
  @Column(name = "old_kcsc_cd")
  private String oldKcscCd;
  @Column(name = "doc_nm", nullable = false)
  private String docNm;
  @Column(name = "doc_yr", nullable = false)
  private String docYr;
  @Column(name = "doc_cycl", nullable = false)
  private int docCycl;
  @Column(name = "doc_er", nullable = false)
  private String docEr;
  @Column(name = "estb_ymd")
  @Temporal(TemporalType.DATE)
  private Date estbYmd;
  @Column(name = "rvsn_ymd")
  @Temporal(TemporalType.DATE)
  private Date rvsnYmd;
  @Column(name = "doc_rev_hist_seq")
  private int docRevHistSeq;
  @Column(name = "doc_brief", length = 1000)
  private String docBrief;
  @Column(name = "doc_rvsn_remark", length = 1000)
  private String docRvsnRemark;
  @Column(name = "doc_consider", length = 255)
  private String docConsider;
  @Column(name = "doc_advice", length = 255)
  private String docAdvice;
  @Column(name = "doc_dept", length = 255)
  private String docDept;
  @Column(name = "doc_relation", length = 255)
  private String docRelation;
  @Column(name = "doc_publish", length = 255)
  private String docPublish;
  @Column(name = "aplcn_bgng_ymd")
  @Temporal(TemporalType.DATE)
  private Date aplcnBgngYmd;
  @Column(name = "aplcn_end_ymd")
  @Temporal(TemporalType.DATE)
  private Date aplcnEndYmd;
  @Column(name = "doc_order", nullable = false)
  private int docOrder;
  @Column(name = "last_yn", nullable = false)
  private char lastYn;
  @Column(name = "doc_file_grp_id")
  private String docFileGrpId;
  @Column(name = "rvsn_file_grp_id")
  private String rvsnFileGrpId;
  @Column(name = "frst_crt_id", nullable = false)
  private String frstCrtId;
  @Column(name = "frst_crt_dt", nullable = false)
  @Temporal(TemporalType.TIMESTAMP)
  private Date frstCrtDt;
  @Column(name = "last_chg_id")
  private String lastChgId;
  @Column(name = "last_chg_dt")
  @Temporal(TemporalType.TIMESTAMP)
  private Date lastChgDt;
  @Column(name = "use_yn", nullable = false)
  private char useYn;
  @Column(name = "old_seq")
  private Integer oldSeq;



  @Schema(description = "현재페이지")
  private int pageIndex = 1;
  @Schema(description = "페이지갯수")
  private int pageUnit = 10;
  @Schema(description = "페이지사이즈")
  private int pageSize = 10;
  @Schema(description = "첫페이지 인덱스")
  private int firstIndex = 1;
  @Schema(description = "마지막페이지 인덱스")
  private int lastIndex = 1;
  @Schema(description = "페이지당 레코드 개수")
  private int recordCountPerPage = 100;
  @Schema(description = "레코드 번호")
  private int rowNo = 0;
  @Transient
  private String listCode;
  @Transient
  private String searchWrd;
  @Transient
  private String tab;
  @Transient
  private String category1;
  @Transient
  private String category2;
  @Transient
  private String category3;
}