35 lines
676 B
Java
35 lines
676 B
Java
|
package com.plannaplan.responses.models;
|
||
|
|
||
|
import com.plannaplan.entities.User;
|
||
|
|
||
|
public class TokenResponse {
|
||
|
private String token;
|
||
|
private Long id;
|
||
|
private String authorityRole;
|
||
|
private String email;
|
||
|
|
||
|
public TokenResponse(User user) {
|
||
|
this.id = user.getId();
|
||
|
this.authorityRole = user.getRole().toString();
|
||
|
this.email = user.getEmail();
|
||
|
this.token = user.getToken();
|
||
|
}
|
||
|
|
||
|
public String getEmail() {
|
||
|
return email;
|
||
|
}
|
||
|
|
||
|
public String getAuthorityRole() {
|
||
|
return authorityRole;
|
||
|
}
|
||
|
|
||
|
public Long getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public String getToken() {
|
||
|
return token;
|
||
|
}
|
||
|
|
||
|
}
|