after refactor cleanup
This commit is contained in:
12
DiunaBI.Application/DTOModels/Common/PagedResult.cs
Normal file
12
DiunaBI.Application/DTOModels/Common/PagedResult.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace DiunaBI.Application.DTOModels.Common;
|
||||
|
||||
public class PagedResult<T>
|
||||
{
|
||||
public List<T> Items { get; set; } = new();
|
||||
public int TotalCount { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int Page { get; set; }
|
||||
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
|
||||
public bool HasPreviousPage => Page > 1;
|
||||
public bool HasNextPage => Page < TotalPages;
|
||||
}
|
||||
Reference in New Issue
Block a user