75 lines
1.4 KiB
Java
Executable File
75 lines
1.4 KiB
Java
Executable File
package com.plannaplan.entities;
|
|
|
|
import java.sql.Date;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
|
|
import com.plannaplan.types.UserRoles;
|
|
|
|
@Entity
|
|
public class User {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
|
private Long id;
|
|
private String name;
|
|
private String surname;
|
|
private String email;
|
|
private UserRoles role;
|
|
private String token;
|
|
private Date tokenCreatedDate;
|
|
|
|
public User() {
|
|
}
|
|
|
|
public String getEmail() {
|
|
return email;
|
|
}
|
|
|
|
public void setEmail(String email) {
|
|
this.email = email;
|
|
}
|
|
|
|
public Date getTokenCreatedDate() {
|
|
return tokenCreatedDate;
|
|
}
|
|
|
|
public String getToken() {
|
|
return token;
|
|
}
|
|
|
|
public void setToken(String token) {
|
|
this.tokenCreatedDate = new Date(System.currentTimeMillis());
|
|
this.token = token;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public UserRoles getRole() {
|
|
return role;
|
|
}
|
|
|
|
public void setRole(UserRoles role) {
|
|
this.role = role;
|
|
}
|
|
|
|
public String getSurname() {
|
|
return surname;
|
|
}
|
|
|
|
public void setSurname(String surname) {
|
|
this.surname = surname;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public Long getId() {
|
|
return this.id;
|
|
}
|
|
} |