diff --git a/src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java b/src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java new file mode 100644 index 0000000..a9e5777 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/probe/model/ProbeHost.java @@ -0,0 +1,48 @@ +package com.loafle.overflow.module.probe.model; + +import com.loafle.overflow.module.infra.model.InfraHost; + +import javax.persistence.*; + +/** + * Created by insanity on 17. 8. 21. + */ + +@Entity +@Table(name = "PROBE_INFRAHOST", schema = "public", catalog = "postgres") +public class ProbeHost { + + private long id; + private Probe probe; + private InfraHost host; + + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + @OneToOne + @JoinColumn(name = "PROBE_ID", nullable = false) + public Probe getProbe() { + return probe; + } + + public void setProbe(Probe probe) { + this.probe = probe; + } + + @OneToOne + @JoinColumn(name = "HOST_ID", nullable = false) + public InfraHost getHost() { + return host; + } + + public void setHost(InfraHost infraHost) { + this.host = infraHost; + } +}