using System; using System.Collections.Generic; namespace Common.Utilities { public class PageModel { /// /// 第几页,从1开始 /// public int PageNumber { get; set; } = 1; /// /// 总页数 /// public int PageCount => (int)Math.Ceiling((decimal)Count / PageSize); /// /// 查询的记录数量 /// public long Count { get; set; } = 0; /// /// 每页大小 /// public int PageSize { set; get; } = 20; /// /// 返回数据 /// public List Result { get; set; } public PageModel() { } public PageModel(int pageNumber, long count, int pageSize, List result) { PageNumber = pageNumber; Count = count; PageSize = pageSize; Result = result; } } }