using DataAccessLayer;
using DataAccessLayer.Filtering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace WcfServices.Dto
{
    [DataContract]
    public class FilterDto
    {
        [DataMember]
        public List<ConditionItemDto> Conditions { get; set; }
        [DataMember]
        public int? PageSize { get; set; }
        [DataMember]
        public int? Page { get; set; }
        [DataMember]
        public List<SortingItemDto> Sorting { get; set; }
    }

    [DataContract]
    public class ConditionItemDto
    {
        [DataMember]
        public ConditionTypeEnum Type { get; set; }
        [DataMember]
        public ConditionItemDto Left { get; set; }
        [DataMember]
        public ConditionItemDto Right { get; set; }
        [DataMember]
        public ConditionItemDto Condition { get; set; }
        [DataMember]
        public string Column { get; set; }
        [DataMember]
        public string Value { get; set; }
    }

    [DataContract]
    public class SortingItemDto
    {
        [DataMember]
        public string Column { get; set; }
        [DataMember]
        public bool Ascending { get; set; }
    }

}
