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.
29 lines
1003 B
29 lines
1003 B
package com.lostfound.model;
|
|
|
|
public class User {
|
|
private String id;
|
|
private String name;
|
|
private String password;
|
|
private String role; // "user" or "admin"
|
|
private int points = 0;
|
|
|
|
// 构造函数
|
|
public User(String id, String name, String password, String role) {
|
|
this.id = id;
|
|
this.name = name;
|
|
this.password = password;
|
|
this.role = role;
|
|
}
|
|
|
|
// Getters and Setters
|
|
public String getId() { return id; }
|
|
public void setId(String id) { this.id = id; }
|
|
public String getName() { return name; }
|
|
public void setName(String name) { this.name = name; }
|
|
public String getPassword() { return password; }
|
|
public void setPassword(String password) { this.password = password; }
|
|
public String getRole() { return role; }
|
|
public void setRole(String role) { this.role = role; }
|
|
public int getPoints() { return points; }
|
|
public void setPoints(int points) { this.points = points; }
|
|
} |