using DatabaseEditor.BL.Filters.Operators;

namespace DatabaseEditor.BL.Filters.Conditions
{
    public abstract class PropertyCondition<T>
    {
        public LogicOperator LogicOperator { get; }

        public string PropertyName { get; }

        public abstract string OperatorText { get; }

        public object PropertyValue { get; }

        protected PropertyCondition(LogicOperator logicOperator, string propertyName, object propertyValue)
        {
            LogicOperator = logicOperator;
            PropertyName = propertyName;
            PropertyValue = propertyValue;
        }

        /// <summary>
        /// String predicate used as parameter for dynamic Linq .Where function
        /// </summary>
        public abstract string Predicate { get; }
    }
}