ing
This commit is contained in:
parent
5b21689fbd
commit
c24d63c734
|
@ -1,6 +1,7 @@
|
|||
package com.loafle.overflow.model.email;
|
||||
|
||||
import com.loafle.overflow.model.member.Member;
|
||||
import com.loafle.overflow.model.meta.MetaEmailStatus;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
@ -16,7 +17,7 @@ public class EmailAuth {
|
|||
private Date createDate;
|
||||
private Date authConfirmDate;
|
||||
private Member member;
|
||||
private String emailType;
|
||||
private MetaEmailStatus emailStatus;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||
|
@ -68,13 +69,13 @@ public class EmailAuth {
|
|||
this.member = member;
|
||||
}
|
||||
|
||||
@Basic
|
||||
@Column(name = "EMAIL_TYPE", nullable = true, length = 10)
|
||||
public String getEmailType() {
|
||||
return emailType;
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "STATUS", nullable = false)
|
||||
public MetaEmailStatus getEmailStatus() {
|
||||
return emailStatus;
|
||||
}
|
||||
|
||||
public void setEmailType(String emailType) {
|
||||
this.emailType = emailType;
|
||||
public void setEmailStatus(MetaEmailStatus emailStatus) {
|
||||
this.emailStatus = emailStatus;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package com.loafle.overflow.model.email.type;
|
||||
|
||||
public enum EmailType {
|
||||
SIGNUP("SIGNUP"),
|
||||
PASSWORD("PASSWORD");
|
||||
|
||||
private String stringValue;
|
||||
EmailType(String string) {stringValue = string;}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return stringValue;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package com.loafle.overflow.model.meta;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
@Entity
|
||||
@Table(name = "META_EMAIL_STATUS", schema = "public")
|
||||
public class MetaEmailStatus {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private Date createDate;
|
||||
|
||||
public MetaEmailStatus(){}
|
||||
|
||||
public MetaEmailStatus(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "NAME", nullable = true, length = 50)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name="CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false)
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user