This commit is contained in:
xiaowei.song
2024-06-06 13:19:24 +08:00
parent c93711290e
commit 127c428a9e
919 changed files with 93 additions and 86 deletions

View File

@@ -0,0 +1,46 @@
using System.Collections.Generic;
namespace ZR.Model
{
/// <summary>
/// 分页参数
/// </summary>
public class PagedInfo<T>
{
/// <summary>
/// 每页行数
/// </summary>
public int PageSize { get; set; } = 10;
/// <summary>
/// 当前页
/// </summary>
public int PageIndex { get; set; } = 1;
/// <summary>
/// 总记录数
/// </summary>
public int TotalNum { get; set; }
/// <summary>
/// 总页数
/// </summary>
public int TotalPage
{
get
{
if (TotalNum > 0)
{
return TotalNum % this.PageSize == 0 ? TotalNum / this.PageSize : TotalNum / this.PageSize + 1;
}
else
{
return 0;
}
}
set { }
}
public List<T> Result { get; set; }
public Dictionary<string, object> Extra { get; set; } = new Dictionary<string, object>();
public PagedInfo()
{
}
}
}