fixed
entity
This commit is contained in:
parent
8d9efcade6
commit
3e0831d9ff
|
@ -24,10 +24,32 @@ public class DiscoveryHistory
|
||||||
@Column(nullable=false)
|
@Column(nullable=false)
|
||||||
private Boolean result;
|
private Boolean result;
|
||||||
|
|
||||||
@JoinColumn
|
@JoinColumn(nullable=false)
|
||||||
@OneToOne(mappedBy = "discovery",cascade = CascadeType.ALL)
|
@OneToOne(mappedBy = "discovery",cascade = CascadeType.ALL)
|
||||||
private DiscoveryZone zone;
|
private DiscoveryZone zone;
|
||||||
|
|
||||||
|
@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false)
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false)
|
||||||
|
private Date updateDate;
|
||||||
|
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateDate() {
|
||||||
|
return updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateDate(Date updateDate) {
|
||||||
|
this.updateDate = updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
public DiscoveryZone getZone() {
|
public DiscoveryZone getZone() {
|
||||||
return zone;
|
return zone;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.loafle.bridge.discoveryhistory.DiscoveryHistory;
|
||||||
import com.loafle.bridge.discoveryhost.DiscoveryHost;
|
import com.loafle.bridge.discoveryhost.DiscoveryHost;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +25,7 @@ public class DiscoveryZone {
|
||||||
@Column(nullable=false)
|
@Column(nullable=false)
|
||||||
private long cidr;
|
private long cidr;
|
||||||
|
|
||||||
@JoinColumn
|
@JoinColumn(nullable=false)
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private DiscoveryHistory discovery;
|
private DiscoveryHistory discovery;
|
||||||
|
@ -35,6 +36,28 @@ public class DiscoveryZone {
|
||||||
@OneToMany(mappedBy = "zone", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "zone", cascade = CascadeType.ALL)
|
||||||
private List<DiscoveryHost> discoveryHosts;
|
private List<DiscoveryHost> discoveryHosts;
|
||||||
|
|
||||||
|
@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false)
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
@Column(columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", nullable = false, insertable = false, updatable = false)
|
||||||
|
private Date updateDate;
|
||||||
|
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateDate() {
|
||||||
|
return updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateDate(Date updateDate) {
|
||||||
|
this.updateDate = updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
public List<HostScanHistory> getHistories() {
|
public List<HostScanHistory> getHistories() {
|
||||||
return histories;
|
return histories;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user