Target
updated
    .gitignore
This commit is contained in:
snoop 2017-06-05 11:36:31 +09:00
parent 8d57db4bbe
commit 601ccfa411
5 changed files with 63 additions and 2 deletions

2
.gitignore vendored
View File

@ -25,4 +25,4 @@ hs_err_pid*
.idea/ .idea/
*.iml *.iml
target/ /target/

View File

@ -1,5 +1,7 @@
package com.loafle.overflow.noauthagent.model; package com.loafle.overflow.noauthagent.model;
import com.loafle.overflow.noauthagent.type.AuthType;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date; import java.util.Date;

View File

@ -1,4 +1,4 @@
package com.loafle.overflow.noauthagent.model; package com.loafle.overflow.noauthagent.type;
/** /**
* Created by root on 17. 5. 31. * Created by root on 17. 5. 31.

View File

@ -0,0 +1,38 @@
package com.loafle.overflow.target.model;
import com.loafle.overflow.target.type.TargetType;
import javax.persistence.*;
import java.util.Date;
/**
* Created by root on 17. 6. 5.
*/
@Entity
public class Target {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@Column(name="TEMP_KEY", unique=true, nullable=false)
private String tempKey;
@Temporal(TemporalType.TIMESTAMP)
@Column(name="DATE", nullable=false)
private Date date;
@Column(name="API_KEY", unique = true, nullable=false)
private String apiKey;
@Column(name="AUTH_STATUS", nullable=false)
@Enumerated(EnumType.STRING)
private TargetType authStatus;
@Column(name="LOCAL_IP", nullable=false)
private long localIP;
@Column(name="HOST_NAME")
private String hostName;
}

View File

@ -0,0 +1,21 @@
package com.loafle.overflow.target.type;
/**
* Created by root on 17. 6. 5.
*/
public enum TargetType {
MACHINE("MACHINE"),
DATABASE("DATABASE"),
WAS("WAS"),
OTHER("OTHER");
private String stringValue;
TargetType(String string) {stringValue = string;}
@Override
public String toString() {
return stringValue;
}
}