package com.dbnt.sims.fpiMgt.affairPlan.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 = "plan_main_info")
@IdClass(PlanMainInfo.PlanMainInfoId.class)
public class PlanMainInfo {
  @Id
  @Column(name = "plan_key")
  private Integer planKey;
  @Id
  @Column(name = "plan_seq")
  private Integer planSeq;
  @Column(name = "plan_type")
  private String planType;
  @Column(name = "plan_info")
  private String planInfo;

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