You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.badminton.entity;
/**
* 用户实体类
* 支持选手、管理员、裁判三种角色
* 对应需求FR-01 用户注册与登录
*/
public class User {
private String userId;
private String username;
private String password;
private String realName;
private String phone;
private String role; // player/admin/referee
public User() {}
public User(String userId, String username, String password,
String realName, String phone, String role) {
this.userId = userId;
this.username = username;
this.password = password;
this.realName = realName;
this.phone = phone;
this.role = role;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
@Override
public String toString() {
return "User{"
+ "userId='" + userId + '\''
+ ", username='" + username + '\''
+ ", realName='" + realName + '\''
+ ", phone='" + phone + '\''
+ ", role='" + role + '\''
+ '}';
}
}