Files
Nemera/src/Lumina.Application/Common/DTO/Pagination/PaginationDataDto.cs
T

39 lines
956 B
C#

#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);
}
}
}