mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15: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,38 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DTO.Pagination;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for pagination metadata.
|
||||
/// </summary>
|
||||
public sealed record PaginationDataDto
|
||||
{
|
||||
private int perPage = 200;
|
||||
private int currentPage = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current page number in a paginated collection.
|
||||
/// </summary>
|
||||
public int CurrentPage
|
||||
{
|
||||
get { return currentPage; }
|
||||
set
|
||||
{
|
||||
currentPage = Math.Max(value, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of items to include per page in paginated results.
|
||||
/// </summary>
|
||||
public int PerPage
|
||||
{
|
||||
get { return perPage; }
|
||||
set
|
||||
{
|
||||
perPage = Math.Max(value, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user