package com.dbnt.kcscbackend.admin.boards.entity;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "tn_bbs")
public class TnBbs {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "bbs_seq")
  private Long bbsSeq;

  @Column(name = "bbs_id", nullable = false)
  @NotBlank(message = "게시판 ID를 입력해주세요.")
  private String bbsId;

  @Column(name = "bbs_title", nullable = false)
  @NotBlank(message = "게시판 이름을 입력해주세요.")
  private String bbsTitle;

  @Column(name = "bbs_desc")
  @NotBlank(message = "게시판 설명을 입력해주세요.")
  private String bbsDesc;

  @Column(name = "bbs_type")
  private String bbsType;

  @Column(name = "bbs_ans_yn", nullable = false)
  private String bbsAnsYn;

  @Column(name = "bbs_repl_yn", nullable = false)
  private String bbsReplYn;

  @Column(name = "read_role_grp_id")
  private String readRoleGrpId;

  @Column(name = "write_role_grp_id")
  private String writeRoleGrpId;

  @Column(name = "sec_role_grp_id")
  private String secRoleGrpId;

  @Column(name = "frst_crt_id", nullable = false)
  private String frstCrtId;

  @Column(name = "frst_crt_dt", nullable = false)
  private LocalDateTime frstCrtDt;

  @Column(name = "last_chg_id")
  private String lastChgId;

  @Column(name = "last_chg_dt")
  private LocalDateTime lastChgDt;

  @Column(name = "use_yn", nullable = false)
  private String useYn;

  @Column(name = "oldd_seq")
  private Long olddSeq;

  @Column(name = "read_role")
  private Long readRole;

  @Column(name = "write_role")
  private Long writeRole;

}