12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System.Collections.Generic;
- namespace Model.Base
- {
- /// <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 Total { get; set; }
- /// <summary>
- /// 总页数
- /// </summary>
- public int TotalPage
- {
- get
- {
- if (Total > 0)
- {
- return Total % this.PageSize == 0 ? Total / this.PageSize : Total / this.PageSize + 1;
- }
- else
- {
- return 0;
- }
- }
- set { }
- }
- public List<T> Records { get; set; }
- public Dictionary<string, object> Extra { get; set; } = new Dictionary<string, object>();
- public PagedInfo()
- {
- }
- }
- }
|