namespace FastBlog.Core.Models;

public class PagedResponse<T>
{
    public long Total { get; }
    public int Amount { get; }
    public int Offset { get; }
    public T[] Data { get; }

    public PagedResponse(long total, int amount, int offset, T[] data)
    {
        Total = total;
        Amount = amount;
        Offset = offset;
        Data = data;
    }
    
    public static PagedResponse<T> Create(long total, int amount, int offset, T[] data)
    {
        return new PagedResponse<T>(total, amount, offset, data);
    }

    public static PagedResponse<T> Empty { get; } = new(0, 0, 0, []);
}