using System.ComponentModel;

namespace IVM.Models.HttpResponses
{
    public class Response<T>
    {
        public T? Data { get; set; }
        public int Total { get; set; }
        public bool AggregateResults { get; set; }
        public string Errors { get; set; }

        public Response()
        {
        }
    }

    public class APIPagedMultiSortedResponse<T> : Response<T>
    {
        public APIPagedMultiSortedResponse()
        {
        }

        public PagedMultiSortedResponse Pagination { get; set; } = new PagedMultiSortedResponse();
    }

    public class PagedMultiSortedResponse : PagedResponse
    {
        public List<SortField> Sort { get; set; }
        public PagedMultiSortedResponse()
        {
            Sort = new List<SortField>();
            PageSize = 0;
            Page = 0;
        }
    }

    public class PagedResponse
    {
        public int PageSize { get; set; }
        public int Page { get; set; }
        public int TotalPages { get; set; }
        public int TotalRecords { get; set; }
    }

public class SortField
    {
        public string? ParameterName { get; set; }
        public SortType SortOrder { get; set; }
    }


public enum SortType
    {
        [Description("OrderBy")]
        ASC,
        [Description("OrderByDescending")]
        DESC
    }



}
