Probe-Host mapping entity
This commit is contained in:
parent
51aa8e3c6e
commit
97edca8f0e
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user