This commit is contained in:
2021-01-27 16:44:55 +00:00
parent 7d1bb41246
commit c59cc5969c
8 changed files with 119 additions and 34 deletions

View File

@@ -1,11 +1,12 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using
namespace AyaNova.DataList
{
public sealed class DataListOptions
public sealed class DataListOptions : DataListBase
{
public const int MaxPageSize = 1000;
public const int DefaultOffset = 0;
@@ -20,7 +21,24 @@ namespace AyaNova.DataList
[FromBody, Required]
public string DataListKey { get; set; }
/*
[FromBody]
public DataListView View { get; set; }
// [FromBody]
// public List<string> Columns { get; set; }
// [FromBody]
// public Dictionary<string, string> SortBy { get; set; }
// [FromBody]
// public List<DataListFilterOption> Filter { get; set; }
// [FromBody]
// public string ClientCriteria { get; set; }
}
public class DataListView
{
/*
OLD EXAMPLE:
{"offset":0,"limit":10,"dataListKey":"CustomerDataList",
"listView":"[
@@ -52,7 +70,7 @@ namespace AyaNova.DataList
{
public string Column { get; set; }
public List<DataListColumnFilter> items { get; set; }
public bool Any {get;set;}//means "or" the filter conditions
public bool Any { get; set; }//means "or" the filter conditions
DataListFilterOption()
{
items = new List<DataListColumnFilter>();