package com.dbnt.sims.fpiMgt.affairResult.model;

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 = "result_info")
@IdClass(ResultInfo.ResultInfoId.class)
public class ResultInfo {
  @Id
  @Column(name = "result_key")
  private Integer resultKey;
  @Id
  @Column(name = "info_seq")
  private Integer infoSeq;
  @Column(name = "contact_target")
  private String contactTarget;
  @Column(name = "contact_info")
  private String contactInfo;

  @Embeddable
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  public static class ResultInfoId implements Serializable {
    private Integer resultKey;
    private Integer infoSeq;
  }
}
