package com.dbnt.faisp.main.fpiMgt.affair.model;

import com.dbnt.faisp.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 = "hash_tag_link")
@IdClass(HashTagLink.HashTagLinkId.class)
public class HashTagLink extends FileInfo {
  @Id
  @Column(name = "affair_key")
  private Integer affairKey;
  @Id
  @Column(name = "tag_key")
  private Integer tagKey;


  @Embeddable
  @Data
  @NoArgsConstructor
  @AllArgsConstructor
  public static class HashTagLinkId implements Serializable {
    private Integer affairKey;
    private Integer tagKey;
  }

}
