package com.dbnt.kcgfilemanager.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.web.bind.annotation.RequestBody;

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

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "BOARD_CATEGORY")
public class BoardCategory {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "CATEGORY_SEQ")
  private Integer categorySeq;
  @Column(name = "DEPTH", nullable = false)
  private Integer depth;
  @Column(name = "PARENT_SEQ")
  private Integer parentSeq;
  @Column(name = "CATEGORY_NAME", nullable = false)
  private String categoryName;
  @Transient
  private List<BoardCategory> childCategoryList;
}
