Refactor authentication logic to unify user account handling and update database schema for user accounts
This commit is contained in:
@@ -1,26 +1,35 @@
|
||||
package com.gameplatform.server.model.entity.admin;
|
||||
package com.gameplatform.server.model.entity.account;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class AdminUser {
|
||||
public class UserAccount {
|
||||
private Long id;
|
||||
private String username;
|
||||
private String passwordHash;
|
||||
private String role; // SUPER / ADMIN
|
||||
private String userType; // ADMIN | AGENT
|
||||
private String username; // 登录名(admin/agent 共用)
|
||||
private String displayName; // 显示名称(agent 可用)
|
||||
private String passwordHash; // BCrypt 或 PLAIN:xxx(初始化用)
|
||||
private String role; // 仅 ADMIN 使用:SUPER / ADMIN
|
||||
private String status; // ENABLED / DISABLED
|
||||
private Long pointsBalance; // 仅 AGENT 使用
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getUserType() { return userType; }
|
||||
public void setUserType(String userType) { this.userType = userType; }
|
||||
public String getUsername() { return username; }
|
||||
public void setUsername(String username) { this.username = username; }
|
||||
public String getDisplayName() { return displayName; }
|
||||
public void setDisplayName(String displayName) { this.displayName = displayName; }
|
||||
public String getPasswordHash() { return passwordHash; }
|
||||
public void setPasswordHash(String passwordHash) { this.passwordHash = passwordHash; }
|
||||
public String getRole() { return role; }
|
||||
public void setRole(String role) { this.role = role; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public Long getPointsBalance() { return pointsBalance; }
|
||||
public void setPointsBalance(Long pointsBalance) { this.pointsBalance = pointsBalance; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.gameplatform.server.model.entity.agent;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class Agent {
|
||||
private Long id;
|
||||
private String name;
|
||||
private String loginAccount;
|
||||
private String passwordHash;
|
||||
private String status; // ENABLED / DISABLED
|
||||
private Long pointsBalance;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
public String getLoginAccount() { return loginAccount; }
|
||||
public void setLoginAccount(String loginAccount) { this.loginAccount = loginAccount; }
|
||||
public String getPasswordHash() { return passwordHash; }
|
||||
public void setPasswordHash(String passwordHash) { this.passwordHash = passwordHash; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String status) { this.status = status; }
|
||||
public Long getPointsBalance() { return pointsBalance; }
|
||||
public void setPointsBalance(Long pointsBalance) { this.pointsBalance = pointsBalance; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user