fixed
date status
This commit is contained in:
parent
2611e33327
commit
a21826dd10
|
@ -66,7 +66,7 @@ public class NoAuthProbe {
|
|||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
@Column(name = "STATUS", nullable = false)
|
||||
@Column(name = "STATUS", nullable = false, length = 1)
|
||||
@Enumerated(EnumType.STRING)
|
||||
public AuthType getStatus() {
|
||||
return status;
|
||||
|
@ -76,7 +76,7 @@ public class NoAuthProbe {
|
|||
this.status = status;
|
||||
}
|
||||
|
||||
@Column(name = "TEMP_PROBE_KEY", nullable = false, length = 50)
|
||||
@Column(name = "TEMP_PROBE_KEY", nullable = false, length = 50, unique = true)
|
||||
public String getTempProbeKey() {
|
||||
return tempProbeKey;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ package com.loafle.overflow.module.noauthprobe.type;
|
|||
* Created by root on 17. 5. 31.
|
||||
*/
|
||||
public enum AuthType {
|
||||
ACCEPT("A"),
|
||||
DENY("D"),
|
||||
PROCESS("P");
|
||||
A("ACCEPT"),
|
||||
D("DENY"),
|
||||
P("PROCESS");
|
||||
|
||||
private String stringValue;
|
||||
AuthType(String string) {stringValue = string;}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.loafle.overflow.module.probe.model;
|
||||
|
||||
import com.loafle.overflow.module.domain.Domain;
|
||||
import com.loafle.overflow.module.probe.type.ProbeStatusType;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.sql.Timestamp;
|
||||
|
@ -13,7 +14,7 @@ import java.util.Date;
|
|||
@Table(name = "PROBE", schema = "public", catalog = "postgres")
|
||||
public class Probe {
|
||||
private long id;
|
||||
private String status;
|
||||
private ProbeStatusType status;
|
||||
private String description;
|
||||
private Date createDate;
|
||||
private Date lastPollingDate;
|
||||
|
@ -33,12 +34,13 @@ public class Probe {
|
|||
}
|
||||
|
||||
|
||||
@Column(name = "STATUS", nullable = true)
|
||||
public String getStatus() {
|
||||
@Column(name = "STATUS", nullable = false, length = 1)
|
||||
@Enumerated(EnumType.STRING)
|
||||
public ProbeStatusType getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
public void setStatus(ProbeStatusType status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
@ -53,7 +55,7 @@ public class Probe {
|
|||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
|
||||
@Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
@ -93,7 +95,7 @@ public class Probe {
|
|||
}
|
||||
|
||||
|
||||
@Column(name = "PROBE_KEY", nullable = false)
|
||||
@Column(name = "PROBE_KEY", nullable = false, unique = true)
|
||||
public String getProbeKey() {
|
||||
return probeKey;
|
||||
}
|
||||
|
@ -103,7 +105,7 @@ public class Probe {
|
|||
}
|
||||
|
||||
|
||||
@Column(name = "ENCRYPTION_KEY", nullable = false, length = 50)
|
||||
@Column(name = "ENCRYPTION_KEY", nullable = false, length = 50, unique = true)
|
||||
public String getEncryptionKey() {
|
||||
return encryptionKey;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.loafle.overflow.module.probe.type;
|
||||
|
||||
/**
|
||||
* Created by root on 17. 6. 23.
|
||||
*/
|
||||
public enum ProbeStatusType {
|
||||
I("INITIAL"),
|
||||
N("NORMAL");
|
||||
|
||||
|
||||
private String stringValue;
|
||||
ProbeStatusType(String string) {stringValue = string;}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return stringValue;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user