XnInputBase.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using System.Collections.Generic;
  2. using System.ComponentModel.DataAnnotations;
  3. namespace YBEE.EQM.Core
  4. {
  5. /// <summary>
  6. /// 通用输入扩展参数(带权限)
  7. /// </summary>
  8. public interface IXnInputBase
  9. {
  10. /// <summary>
  11. /// 授权菜单
  12. /// </summary>
  13. public List<int> GrantMenuIdList { get; set; }
  14. /// <summary>
  15. /// 授权角色
  16. /// </summary>
  17. public List<int> GrantRoleIdList { get; set; }
  18. /// <summary>
  19. /// 授权数据
  20. /// </summary>
  21. public List<int> GrantOrgIdList { get; set; }
  22. }
  23. /// <summary>
  24. /// 通用分页输入参数
  25. /// </summary>
  26. public class PageInputBase
  27. {
  28. /// <summary>
  29. /// 当前页码
  30. /// </summary>
  31. [Required(ErrorMessage = "当前页码不能为空")]
  32. public virtual int PageIndex { get; set; } = 1;
  33. /// <summary>
  34. /// 每页大小
  35. /// </summary>
  36. [Required(ErrorMessage = "每页大小不能为空")]
  37. public virtual int PageSize { get; set; } = 20;
  38. /// <summary>
  39. /// 搜索值
  40. /// </summary>
  41. public virtual string SearchValue { get; set; }
  42. /// <summary>
  43. /// 搜索开始时间
  44. /// </summary>
  45. public virtual string SearchBeginTime { get; set; }
  46. /// <summary>
  47. /// 搜索结束时间
  48. /// </summary>
  49. public virtual string SearchEndTime { get; set; }
  50. /// <summary>
  51. /// 排序字段
  52. /// </summary>
  53. public virtual string SortField { get; set; }
  54. /// <summary>
  55. /// 排序方法,默认升序,否则降序(配合antd前端,约定参数为 Ascend,Dscend)
  56. /// </summary>
  57. public virtual string SortOrder { get; set; }
  58. /// <summary>
  59. /// 降序排序(不要问我为什么是descend不是desc,前端约定参数就是这样)
  60. /// </summary>
  61. public virtual string DescStr { get; set; } = "descend";
  62. /// <summary>
  63. /// 复杂查询条件
  64. /// </summary>
  65. public virtual List<Condition> SearchParameters { get; set; } = new();
  66. }
  67. }