namespace FastBlog.Core.Models;

public class PagedRequest
{
    public int Amount { get; }
    public int Offset { get; }
    
    public PagedRequest(int amount, int offset)
    {
        if(amount < 1)
        {
            throw new ArgumentOutOfRangeException(nameof(amount), "Amount must be greater than 0");
        }
        if(offset < 0)
        {
            throw new ArgumentOutOfRangeException(nameof(offset), "Offset must be greater than or equal to 0");
        }
        Amount = amount;
        Offset = offset;
    }
}