refactor: 移除全局单例、修复分层违规、统一错误与响应
This commit is contained in:
@@ -37,6 +37,11 @@ type UserService interface {
|
||||
// 配置获取
|
||||
GetMaxProfilesPerUser() int
|
||||
GetMaxTexturesPerUser() int
|
||||
|
||||
// 管理员操作
|
||||
ListUsers(ctx context.Context, page, pageSize int) ([]*model.User, int64, error)
|
||||
SetRole(ctx context.Context, userID int64, role string) error
|
||||
SetStatus(ctx context.Context, userID int64, status int16) error
|
||||
}
|
||||
|
||||
// ProfileService 档案服务接口
|
||||
@@ -73,6 +78,11 @@ type TextureService interface {
|
||||
|
||||
// 限制检查
|
||||
CheckUploadLimit(ctx context.Context, uploaderID int64, maxTextures int) error
|
||||
|
||||
// 管理员操作
|
||||
ListForAdmin(ctx context.Context, page, pageSize int) ([]*model.Texture, int64, error)
|
||||
AdminDelete(ctx context.Context, textureID int64) error
|
||||
IncrementDownload(ctx context.Context, textureID int64) error
|
||||
}
|
||||
|
||||
// TokenService 令牌服务接口
|
||||
|
||||
Reference in New Issue
Block a user