using System.Text.Json.Serialization; namespace Indotalent.Shared.Models; public class PagedList { public PagedList() { Value = new List(); } public List Value { get; set; } public int Skip { get; set; } public int Top { get; set; } public int TotalPages { get; set; } public int Count { get; set; } [JsonConstructor] public PagedList(List value, int count, int skip, int top, int totalPages) { Value = value; Count = count; Skip = skip; Top = top; TotalPages = totalPages; } public PagedList(List value, int count, int skip, int top) { Value = value; Count = count; Skip = skip; Top = top; TotalPages = (int)Math.Ceiling(count / (double)top); } public bool HasPrevious => Skip > 0; public bool HasNext => (Skip + Top) < Count; }