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.
student_studying/src/model/User.java

24 lines
683 B

package model;
public class User {
private String email;
private String password;
private String username;
// 修改构造函数,添加 username 参数
public User(String email, String password, String username) {
this.email = email;
this.password = password;
this.username = username;
}
// 保留原有无参数构造函数,用于旧数据兼容
public User(String email, String password) {
this(email, password, email); // 默认用户名为邮箱
}
public String getEmail() { return email; }
public String getPassword() { return password; }
public String getUsername() { return username; }
}