75 lines
1.5 KiB
Java
75 lines
1.5 KiB
Java
|
package com.domain;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
public class User {
|
||
|
|
||
|
private Long id;
|
||
|
private String username;
|
||
|
private String email;
|
||
|
private String password;
|
||
|
private String phoneNum;
|
||
|
|
||
|
//当前用户具备哪些角色
|
||
|
private List<Role> roles;
|
||
|
|
||
|
public List<Role> getRoles() {
|
||
|
return roles;
|
||
|
}
|
||
|
|
||
|
public void setRoles(List<Role> roles) {
|
||
|
this.roles = roles;
|
||
|
}
|
||
|
|
||
|
public Long getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public void setId(Long id) {
|
||
|
this.id = id;
|
||
|
}
|
||
|
|
||
|
public String getUsername() {
|
||
|
return username;
|
||
|
}
|
||
|
|
||
|
public void setUsername(String username) {
|
||
|
this.username = username;
|
||
|
}
|
||
|
|
||
|
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 String getPhoneNum() {
|
||
|
return phoneNum;
|
||
|
}
|
||
|
|
||
|
public void setPhoneNum(String phoneNum) {
|
||
|
this.phoneNum = phoneNum;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
return "User{" +
|
||
|
"id=" + id +
|
||
|
", username='" + username + '\'' +
|
||
|
", email='" + email + '\'' +
|
||
|
", password='" + password + '\'' +
|
||
|
", phoneNum='" + phoneNum + '\'' +
|
||
|
'}';
|
||
|
}
|
||
|
}
|