using System.Collections.Generic;
using System.Linq;

namespace InABox.Core
{
    public class QAQuestionLookups : EntityLookup<QAQuestion>
    {
        public override Columns<QAQuestion> DefineColumns()
        {
            return base.DefineColumns()
                .Add(x => x.Question)
                .Add(x => x.Answer);
        }

        public override string FormatLookup(Dictionary<string, object?> values, IEnumerable<string> exclude)
        {
            return LookupFactory.DefaultFormatLookup(values, exclude.Concat(new[] { "ID", "Answer" }));
        }

        public override Filter<QAQuestion> DefineFilter()
        {
            return null;
        }

        public override SortOrder<QAQuestion> DefineSortOrder()
        {
            return new SortOrder<QAQuestion>(x => x.Sequence);
        }
    }
}