83 lines
1.7 KiB
Java
83 lines
1.7 KiB
Java
package org.cerberus.entities.persistence;
|
|
|
|
import org.hibernate.annotations.Generated;
|
|
import org.hibernate.annotations.GenerationTime;
|
|
import org.hibernate.annotations.Proxy;
|
|
|
|
import javax.persistence.*;
|
|
import java.time.LocalDate;
|
|
import java.util.List;
|
|
|
|
@Entity
|
|
@Table(name="`user`")
|
|
@Proxy(lazy = false)
|
|
public class User {
|
|
@Id
|
|
@Generated(GenerationTime.ALWAYS)
|
|
private String id;
|
|
|
|
@Column(nullable = false)
|
|
private String name;
|
|
|
|
@Column(nullable = false)
|
|
private String email;
|
|
|
|
@Column(nullable = false)
|
|
private String password;
|
|
|
|
@Column(nullable = false)
|
|
@Generated(GenerationTime.ALWAYS)
|
|
private LocalDate inscriptionDate;
|
|
|
|
@OneToMany(mappedBy = "user")
|
|
private List<ApplicationRole> applicationRoleList;
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getEmail() {
|
|
return email;
|
|
}
|
|
|
|
public void setEmail(String email) {
|
|
this.email = email;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
|
|
public LocalDate getInscriptionDate() {
|
|
return inscriptionDate;
|
|
}
|
|
|
|
public void setInscriptionDate(LocalDate inscriptionDate) {
|
|
this.inscriptionDate = inscriptionDate;
|
|
}
|
|
|
|
public List<ApplicationRole> getApplicationRoleList() {
|
|
return applicationRoleList;
|
|
}
|
|
|
|
public void setApplicationRoleList(List<ApplicationRole> applicationRoleList) {
|
|
this.applicationRoleList = applicationRoleList;
|
|
}
|
|
}
|