using System; using System.Collections.Generic; using System.Text; namespace MAX.Framework.Commons { public class PageData { public long Total { get; set; } public int PageIndex { get; set; } public int PageSize { get; set; } public int TotalPages => PageSize > 0 ? (int)Math.Ceiling((double)Total / PageSize) : 0; public List List { get; set; } = new(); public PageData() { } public PageData(List list, long total, int pageIndex, int pageSize) { List = list; Total = total; PageIndex = pageIndex; PageSize = pageSize; } } }