Add agent index with pagination

This commit is contained in:
2025-07-30 22:27:01 +07:00
parent 20b0881084
commit 4b0da0e864
10 changed files with 844 additions and 76 deletions

View File

@@ -0,0 +1,57 @@
namespace Managing.Api.Models.Responses;
/// <summary>
/// Response model for paginated agent index results
/// </summary>
public class PaginatedAgentIndexResponse
{
/// <summary>
/// The list of agent summaries for the current page
/// </summary>
public IEnumerable<AgentSummaryViewModel> AgentSummaries { get; set; } = new List<AgentSummaryViewModel>();
/// <summary>
/// Total number of agents across all pages
/// </summary>
public int TotalCount { get; set; }
/// <summary>
/// Current page number
/// </summary>
public int CurrentPage { get; set; }
/// <summary>
/// Number of items per page
/// </summary>
public int PageSize { get; set; }
/// <summary>
/// Total number of pages
/// </summary>
public int TotalPages { get; set; }
/// <summary>
/// Whether there are more pages available
/// </summary>
public bool HasNextPage { get; set; }
/// <summary>
/// Whether there are previous pages available
/// </summary>
public bool HasPreviousPage { get; set; }
/// <summary>
/// Time filter applied to the data
/// </summary>
public string TimeFilter { get; set; } = "Total";
/// <summary>
/// Field used for sorting
/// </summary>
public string SortBy { get; set; } = "TotalPnL";
/// <summary>
/// Sort order (asc or desc)
/// </summary>
public string SortOrder { get; set; } = "desc";
}