package com.dbnt.sims.faRpt.model;

import com.dbnt.sims.config.FileInfo;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "fa_rpt_read_user")
@IdClass(FaRptReadUser.FaRptReadUserId.class)
public class FaRptReadUser extends FileInfo {
  @Id
  @Column(name = "fa_rpt_key")
  private Integer faRptKey;
  @Id
  @Column(name = "user_seq")
  private Integer userSeq;
  @Column(name = "read_yn")
  private String readYn;
  @Column(name = "og_cd")
  private String ogCd;
  @Column(name = "ofc_cd")
  private String ofcCd;
  @Column(name = "title_cd")
  private String titleCd;
  @Column(name = "user_nm")
  private String userNm;


  @Embeddable
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  public static class FaRptReadUserId implements Serializable {
    private Integer faRptKey;
    private Integer userSeq;
  }

}
