using MediatR;

namespace IamService.API.Application.Queries.Users;

/// <summary>
/// EN: Query to get users with pagination.
/// VI: Query để lấy danh sách users với phân trang.
/// </summary>
public record GetUsersQuery(
    int PageNumber = 1,
    int PageSize = 10
) : IRequest<GetUsersQueryResult>;

/// <summary>
/// EN: Result of get users query.
/// VI: Kết quả query lấy users.
/// </summary>
public record GetUsersQueryResult(
    IEnumerable<UserViewModel> Users,
    int TotalCount,
    int PageNumber,
    int PageSize
);

/// <summary>
/// EN: User view model for queries.
/// VI: User view model cho queries.
/// </summary>
public record UserViewModel(
    Guid Id,
    string Email,
    string FirstName,
    string LastName,
    string FullName,
    string Status,
    DateTime CreatedAt,
    DateTime? LastLoginAt
);
