using System.Collections.Generic;

namespace VCommon.VApplication.Dto
{
    public interface IPagedResult<T>
    {
        int TotalRecord { get; }
        IReadOnlyList<T> Items { get; }
    }

    public class PagedResult<T> : IPagedResult<T>
    {
        public int TotalRecord { get; }
        public IReadOnlyList<T> Items { get; }

        public PagedResult(int totalRecord, IReadOnlyList<T> items)
        {
            TotalRecord = totalRecord;
            Items = items;
        }
    }
}
