2021-08-23 16:57:25 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
2021-11-28 11:11:34 +08:00
|
|
|
|
namespace ZR.Model
|
2021-08-23 16:57:25 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 分页参数
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class PagedInfo<T>
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 每页行数
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int PageSize { get; set; } = 10;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 当前页
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int PageIndex { get; set; } = 1;
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 总记录数
|
|
|
|
|
|
/// </summary>
|
2021-11-28 11:11:34 +08:00
|
|
|
|
public int TotalNum { get; set; }
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 总页数
|
|
|
|
|
|
/// </summary>
|
2021-11-28 11:11:34 +08:00
|
|
|
|
public int TotalPage
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (TotalNum > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
return TotalNum % this.PageSize == 0 ? TotalNum / this.PageSize : TotalNum / this.PageSize + 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
set { }
|
|
|
|
|
|
}
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public List<T> Result { get; set; }
|
2022-03-20 19:26:17 +08:00
|
|
|
|
public Dictionary<string, object> Extra { get; set; } = new Dictionary<string, object>();
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public PagedInfo()
|
2022-01-11 22:13:57 +08:00
|
|
|
|
{
|
2021-08-23 16:57:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|