package com.dbnt.faisp.fpiMgt.monthPlan.model;

import com.dbnt.faisp.config.BaseBoard;
import com.fasterxml.jackson.annotation.JsonFormat;
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.LocalDate;
import java.util.List;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "board_plan")
public class BoardPlan extends BaseBoard {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "plan_key")
  private Integer planKey;
  @Column(name = "plan_state")
  private String planState;
  @Column(name = "content_title")
  private String contentTitle;
  @Column(name = "plan_dt")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate planDt;
  @Column(name = "section_nm")
  private String sectionNm;
  @Column(name = "section_apprv")
  private String sectionApprv;
  @Column(name = "section_etc")
  private String sectionEtc;
  @Column(name = "head_nm")
  private String headNm;
  @Column(name = "head_apprv")
  private String headApprv;
  @Column(name = "head_etc")
  private String headEtc;

  @Transient
  private List<PlanMainInfo> mainInfoList;
  @Transient
  private List<PlanFile> fileList;

}
