Learn.Archives/Learn.Archives.Core/Model/Dto/QueryRequestBase.cs

76 lines
2.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using SqlSugar;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Learn.Archives.Core.Model.Dto
{
/// <summary>
/// 查询实体
/// </summary>
public partial class QueryDto
{
/// <summary>
/// 查询条件
/// </summary>
public List<ConditionalModel> Conditions { get; set; } = new List<ConditionalModel>();
/// <summary>
/// 排序字段名 例【CreateTime】
/// </summary>
public string OrderBy { get; set; } = "CreateTime";
/// <summary>
/// 排序方式
/// </summary>
public OrderByType OrderByType { get; set; } = OrderByType.Desc;
}
/// <summary>
/// 查询请求基类
/// </summary>
public class QueryRequestBase : QueryDto
{
/// <summary>
/// 页面索引
/// </summary>
public int PageIndex { get; set; } = 0;
/// <summary>
/// 页面数量
/// </summary>
public int PageSize { get; set; } = 20;
}
/// <summary>
/// 查询下拉列表
/// </summary>
public class QueryCombo : QueryDto
{
/// <summary>
/// 值对应属性名称
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public string ValueName { get; set; }
/// <summary>
/// 文本对应属性名称
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public string TextName { get; set; }
}
/// <summary>
/// 查询导出
/// </summary>
public class QueryExport : QueryDto
{
/// <summary>
/// 字段转换 班级:[{1班级}]
/// </summary>
public Dictionary<string, Dictionary<string,string>> DataSource { get; set; }
/// <summary>
/// 导出字段 学校:School
/// </summary>
public Dictionary<string, string> Custom { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
}
}