using Qusion.Framework.Data;

namespace Qusion.WebApp.Areas.cms.Models.Query
{
    public abstract class QueryInput
    {
        private int _page = 1;

        public string SortBy { get; set; }
        public SortOrder SortDirection { get; set; }

        public int Page
        {
            get { return _page; }
            set { _page = value; }
        }

        public int Size { get; set; }

        public string Q { get; set; }

        public PagerInfo Paging
        {
            get { return new PagerInfo(Page); }
        }

        public SortingInfo Sorting
        {
            get { return new SortingInfo(SortBy, SortDirection); }
        }
    }
}