feat(auth): extend LoginResponse with username + mustChangePassword + ultimoLogin [UDT-008]
This commit is contained in:
9
src/api/SIGCM2.Application/Common/PagedResult.cs
Normal file
9
src/api/SIGCM2.Application/Common/PagedResult.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace SIGCM2.Application.Common;
|
||||
|
||||
/// <summary>Generic paged result for list queries.</summary>
|
||||
public sealed record PagedResult<T>(
|
||||
IReadOnlyList<T> Items,
|
||||
int Page,
|
||||
int PageSize,
|
||||
int Total
|
||||
);
|
||||
10
src/api/SIGCM2.Application/Common/UpdateUsuarioFields.cs
Normal file
10
src/api/SIGCM2.Application/Common/UpdateUsuarioFields.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace SIGCM2.Application.Common;
|
||||
|
||||
/// <summary>Mutable fields for updating a usuario profile. Username and PasswordHash are immutable.</summary>
|
||||
public sealed record UpdateUsuarioFields(
|
||||
string Nombre,
|
||||
string Apellido,
|
||||
string? Email,
|
||||
string Rol,
|
||||
bool Activo
|
||||
);
|
||||
14
src/api/SIGCM2.Application/Common/UsuarioListItem.cs
Normal file
14
src/api/SIGCM2.Application/Common/UsuarioListItem.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace SIGCM2.Application.Common;
|
||||
|
||||
/// <summary>Light projection of a usuario for list views.</summary>
|
||||
public sealed record UsuarioListItem(
|
||||
int Id,
|
||||
string Username,
|
||||
string Nombre,
|
||||
string Apellido,
|
||||
string? Email,
|
||||
string Rol,
|
||||
bool Activo,
|
||||
DateTime? UltimoLogin,
|
||||
DateTime? FechaModificacion
|
||||
);
|
||||
10
src/api/SIGCM2.Application/Common/UsuariosQuery.cs
Normal file
10
src/api/SIGCM2.Application/Common/UsuariosQuery.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace SIGCM2.Application.Common;
|
||||
|
||||
/// <summary>Query parameters for listing usuarios with optional filters and paging.</summary>
|
||||
public sealed record UsuariosQuery(
|
||||
int Page,
|
||||
int PageSize,
|
||||
string? Rol,
|
||||
bool? Activo,
|
||||
string? Search
|
||||
);
|
||||
Reference in New Issue
Block a user