using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json.Linq;
using Tiobon.Core.Model;

namespace Tiobon.Core.Common;


/// <summary>
/// 动态查询条件
/// </summary>
public class QueryBody
{
    /// <summary>
    /// 起始位置(e.g. 0)
    /// </summary>
    [Required]
    public int pageNum { get; set; } = 1;
    /// <summary>
    /// 每页数量(e.g. 10)
    /// </summary>
    [Required]
    public int pageSize { get; set; } = 100000;
    private JObject _jsonParam;
    /// <summary>
    /// 查询条件( 例如:id = 1 and name = 小明)
    /// </summary>
    public JObject jsonParam
    {
        get { return _jsonParam; }
        set
        {
            _jsonParam = value;
        }
    }

    /// <summary>
    /// 排序条件表达式(e.g. LoginName ASC,Name DESC)
    /// </summary>
    public string orderBy { get; set; }
    public string menuName { get; set; }
    public int langId { get; set; }


}
public class JsonParam
{
    public object columnValue { get; set; }
    public string operationKey { get; set; }
    public string token { get; set; }

}
public class JsonParam1
{
    public List<string> columnValue { get; set; }
    public string operationKey { get; set; }
    public string token { get; set; }

}

/// <summary>
/// 动态查询条件
/// </summary>
public class QueryForm
{
    public string doType { get; set; }
    public long? id { get; set; }
    public int langId { get; set; }
    public string menuName { get; set; }
    public string token { get; set; }
    public string procName { get; set; }
    public string timestamp { get; set; }
    public string userId { get; set; }
    private JObject _jsonParam;
    public JObject jsonParam
    {
        get { return _jsonParam; }
        set
        {
            _jsonParam = value;
        }
    }

}

public class QueryForm1
{
    public string doType { get; set; }
    public long? id { get; set; }
    public int langId { get; set; }
    public string menuName { get; set; }
    public string token { get; set; }
    public string procName { get; set; }
    public string timestamp { get; set; }
    public string userId { get; set; }
    public object jsonParam { get; set; }


}

public class QueryExportField
{
    public List<string> ExFields { get; set; }
    public string IsTitle { get; set; }
    public string TitleName { get; set; }
    public List<long> SelectRowKeys { get; set; }

}

/// <summary>
/// 动态查询条件
/// </summary>
public class QueryExport
{
    public string commonType { get; set; }
    public QueryExportField exportSet { get; set; }

    public string getDataType { get; set; }
    private JObject _jsonParam;
    public int langId { get; set; }
    public string menuName { get; set; }
    public string orderBy { get; set; }
    public int pageNum { get; set; }
    public int pageSize { get; set; }
    public string token { get; set; }
    public string procName { get; set; }
    public string timestamp { get; set; }
    public string userId { get; set; }

    public JObject jsonParam
    {
        get { return _jsonParam; }
        set
        {
            _jsonParam = value;
        }
    }

}
public class QueryExportColumn
{
    public int sortNum { get; set; }
    public string label { get; set; }
    public string field { get; set; }
    public string dataSource { get; set; }
    public string required { get; set; }

    public string dataType { get; set; }

    public string elementType { get; set; }
    public string commentText { get; set; }
    public string dataSourceType { get; set; }

    public int? dataSourceId { get; set; }

    public string Comment { get; set; }
}

public class QueryExportReturn
{
    public JM_PageControlT1 JM_PageControlT1 { get; set; } = new JM_PageControlT1();
    public JM_TableColumnT1 JM_TableColumnT1 { get; set; } = new JM_TableColumnT1();
    public List<DT_PageMutiMsg> DT_PageMutiMsg { get; set; }

    public DT_Procedure DT_Procedure { get; set; } = new DT_Procedure();
}