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(ResultToPlan.ResultToPlanId.class)
public class ResultToPlan {
  @Id
  @Column(name = "plan_key")
  private Integer planKey;
  @Id
  @Column(name = "result_key")
  private Integer resultKey;

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