Ajoute une zone d'administration des utilisateurs
This commit is contained in:
116
ChessCubing.Server/Admin/AdminUserContracts.cs
Normal file
116
ChessCubing.Server/Admin/AdminUserContracts.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
namespace ChessCubing.Server.Admin;
|
||||
|
||||
public sealed class AdminUserSummaryResponse
|
||||
{
|
||||
public string Subject { get; init; } = string.Empty;
|
||||
|
||||
public string Username { get; init; } = string.Empty;
|
||||
|
||||
public string? Email { get; init; }
|
||||
|
||||
public string IdentityDisplayName { get; init; } = string.Empty;
|
||||
|
||||
public string? SiteDisplayName { get; init; }
|
||||
|
||||
public bool IsEnabled { get; init; }
|
||||
|
||||
public bool IsEmailVerified { get; init; }
|
||||
|
||||
public bool HasSiteProfile { get; init; }
|
||||
|
||||
public string? Club { get; init; }
|
||||
|
||||
public string? City { get; init; }
|
||||
|
||||
public string? PreferredFormat { get; init; }
|
||||
|
||||
public DateTime? AccountCreatedUtc { get; init; }
|
||||
|
||||
public DateTime? SiteProfileUpdatedUtc { get; init; }
|
||||
}
|
||||
|
||||
public sealed class AdminUserDetailResponse
|
||||
{
|
||||
public string Subject { get; init; } = string.Empty;
|
||||
|
||||
public string Username { get; init; } = string.Empty;
|
||||
|
||||
public string? Email { get; init; }
|
||||
|
||||
public string? FirstName { get; init; }
|
||||
|
||||
public string? LastName { get; init; }
|
||||
|
||||
public string IdentityDisplayName { get; init; } = string.Empty;
|
||||
|
||||
public bool IsEnabled { get; init; }
|
||||
|
||||
public bool IsEmailVerified { get; init; }
|
||||
|
||||
public DateTime? AccountCreatedUtc { get; init; }
|
||||
|
||||
public bool HasSiteProfile { get; init; }
|
||||
|
||||
public string DisplayName { get; init; } = string.Empty;
|
||||
|
||||
public string? Club { get; init; }
|
||||
|
||||
public string? City { get; init; }
|
||||
|
||||
public string? PreferredFormat { get; init; }
|
||||
|
||||
public string? FavoriteCube { get; init; }
|
||||
|
||||
public string? Bio { get; init; }
|
||||
|
||||
public DateTime? SiteProfileCreatedUtc { get; init; }
|
||||
|
||||
public DateTime? SiteProfileUpdatedUtc { get; init; }
|
||||
}
|
||||
|
||||
public sealed class AdminUpdateUserRequest
|
||||
{
|
||||
public string Username { get; init; } = string.Empty;
|
||||
|
||||
public string? Email { get; init; }
|
||||
|
||||
public string? FirstName { get; init; }
|
||||
|
||||
public string? LastName { get; init; }
|
||||
|
||||
public bool IsEnabled { get; init; }
|
||||
|
||||
public bool IsEmailVerified { get; init; }
|
||||
|
||||
public string? DisplayName { get; init; }
|
||||
|
||||
public string? Club { get; init; }
|
||||
|
||||
public string? City { get; init; }
|
||||
|
||||
public string? PreferredFormat { get; init; }
|
||||
|
||||
public string? FavoriteCube { get; init; }
|
||||
|
||||
public string? Bio { get; init; }
|
||||
}
|
||||
|
||||
public sealed record AdminIdentityUser(
|
||||
string Subject,
|
||||
string Username,
|
||||
string? Email,
|
||||
string? FirstName,
|
||||
string? LastName,
|
||||
bool IsEnabled,
|
||||
bool IsEmailVerified,
|
||||
DateTime? CreatedUtc);
|
||||
|
||||
public sealed record AdminIdentityUserUpdateRequest(
|
||||
string Username,
|
||||
string? Email,
|
||||
string? FirstName,
|
||||
string? LastName,
|
||||
bool IsEnabled,
|
||||
bool IsEmailVerified);
|
||||
|
||||
public sealed class AdminUserValidationException(string message) : Exception(message);
|
||||
Reference in New Issue
Block a user