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 = "clear_info")
@IdClass(ClearInfo.ClearInfoId.class)
public class ClearInfo {
  @Id
  @Column(name = "result_key")
  private Integer resultKey;
  @Id
  @Column(name = "info_seq")
  private Integer infoSeq;
  @Column(name = "use_catg")
  private String useCatg;
  @Column(name = "use_detail")
  private String useDetail;
  @Column(name = "price")
  private Double price;

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