You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
694 B
39 lines
694 B
3 years ago
|
namespace Easy.Result;
|
||
|
|
||
|
public record PagingRequest : IModel
|
||
|
{
|
||
|
private int _pageIndex;
|
||
|
private int _pageSize;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 当前第几页
|
||
|
/// </summary>
|
||
|
public int PageIndex
|
||
|
{
|
||
|
get => _pageIndex;
|
||
|
set
|
||
|
{
|
||
|
if (value <= 0) value = 1;
|
||
|
_pageIndex = value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 页面数量
|
||
|
/// </summary>
|
||
|
public int PageSize
|
||
|
{
|
||
|
get => _pageSize;
|
||
|
set
|
||
|
{
|
||
|
if (value <= 9) value = 10;
|
||
|
_pageSize = value;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 默认是降序
|
||
|
/// </summary>
|
||
|
public bool OrderByDescending { get; set; } = true;
|
||
|
}
|