mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Adds pagination and filtering to the API
This commit is contained in:
1 parent
ad984910a2
commit
ce4ebf36bc
59 files changed
+4423
-242
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Collections.Generic;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DTO.Pagination;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a paginated result containing a subset of data and pagination metadata for the current page.
|
||||
/// </summary>
|
||||
/// <typeparam name="TData">The type of the data items contained in the paginated result.</typeparam>
|
||||
public sealed record PaginatedResultDto<TData>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the collection of data items associated with this instance.
|
||||
/// </summary>
|
||||
public required IReadOnlyList<TData> Data { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current page number in a paginated collection.
|
||||
/// </summary>
|
||||
public required int CurrentPage { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of items to include per page in paginated results.
|
||||
/// </summary>
|
||||
public required int PerPage { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total number of elements available in the paginated result set.
|
||||
/// </summary>
|
||||
public required int Count { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total number of pages based on elements available in the result set and per page.
|
||||
/// </summary>
|
||||
public required int NumberOfPages { get; init; }
|
||||
}
|
||||
Reference in new issue
Block a user