initial commit

This commit is contained in:
2026-07-21 14:28:43 +07:00
commit 01107db6fd
995 changed files with 75124 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
using System.Text.Json.Serialization;
namespace Indotalent.Shared.Models;
public class PagedList<T>
{
public PagedList()
{
Value = new List<T>();
}
public List<T> 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<T> value, int count, int skip, int top, int totalPages)
{
Value = value;
Count = count;
Skip = skip;
Top = top;
TotalPages = totalPages;
}
public PagedList(List<T> 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;
}