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.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

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

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "BOARD")
public class Board extends BaseModel{
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "CONTENT_SEQ")
  private Integer contentSeq;
  @Column(name = "CATEGORY_SEQ")
  private Integer categorySeq;
  @Column(name = "TITLE")
  private String title;
  @Column(name = "DESCRIPTION")
  private String description;
  @Column(name = "STATUS")
  private String status;
  @Column(name = "VIEW_CNT")
  private Integer viewCnt;
  @Column(name = "CREATE_ID")
  private String createId;
  @Column(name = "CREATE_DATE")
  private LocalDateTime createDate;

  @Transient
  private String categoryName;

  @Transient
  private String createName;
  @Transient
  private Integer fileCnt;

  @Transient
  private List<FileInfo> childFileList;
  @Transient
  private List<HashTag> hashTagList;
  @Transient
  private List<BoardCategory> categoryList;

  @Transient
  private String hashTagStr;
  @Transient
  private List<MultipartFile> fileList;

  @Transient
  private String originalName;
}
