package com.dbnt.faisp.main.fpiMgt.sri.model;

import com.dbnt.faisp.config.BaseModel;
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 org.springframework.web.multipart.MultipartFile;

import javax.persistence.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "fa_sri_board")
public class Sri extends BaseModel {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "fa_sri_key")
  private Integer faSriKey;
  @Column(name = "fa_sri_type")
  private String faSriType;
  @Column(name = "title")
  private String title;
  @Column(name = "content")
  private String content;
  @Column(name = "status")
  private String status;
  @Column(name = "fa_sri_edate")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate faSriEdate;
  @Column(name = "wrt_organ")
  private String wrtOrgan;
  @Column(name = "wrt_part")
  private String wrtPart;
  @Column(name = "wrt_user_seq")
  private Integer wrtUserSeq;
  @Column(name = "wrt_title")
  private String wrtTitle;
  @Column(name = "wrt_user_nm")
  private String wrtUserNm;
  @Column(name = "wrt_dt")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
  private LocalDateTime wrtDt;
  @Column(name = "ref_key")
  private Integer refKey;

  @Transient
  private Integer receiveUserSeq;
  @Transient
  private String activeTab;
  @Transient
  private Integer fileCnt;
  @Transient
  private Integer readCnt;
  @Transient
  private Integer userCnt;
  @Transient
  private List<SriFile> fileList;
  @Transient
  private List<SriReadUser> readUserList;
  @Transient
  private List<MultipartFile> multipartFileList;
  
@Override
public String toString() {
	return "Sri [faSriKey=" + faSriKey + ", faSriType=" + faSriType + ", title=" + title + ", content=" + content
			+ ", status=" + status + ", faSriEdate=" + faSriEdate + ", wrtOrgan=" + wrtOrgan + ", wrtPart=" + wrtPart
			+ ", wrtUserSeq=" + wrtUserSeq + ", wrtTitle=" + wrtTitle + ", wrtUserNm=" + wrtUserNm + ", wrtDt=" + wrtDt
			+ ", receiveUserSeq=" + receiveUserSeq + ", activeTab=" + activeTab + ", fileCnt=" + fileCnt + ", readCnt="
			+ readCnt + ", userCnt=" + userCnt + ", fileList=" + fileList + ", readUserList=" + readUserList
			+ ", multipartFileList=" + multipartFileList + "]";
}
  
  
  
}
