ViewBase.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. namespace OASystem.Domain.ViewModels
  2. {
  3. public class ViewBase
  4. {
  5. /// <summary>
  6. /// 数据获取时间
  7. /// </summary>
  8. public string ReceiveDt { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
  9. /// <summary>
  10. /// 数据返回时间
  11. /// </summary>
  12. public string ReturnDt { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
  13. }
  14. public class ListViewBase<T> : ViewBase
  15. {
  16. /// <summary>
  17. /// 当前页码
  18. /// </summary>
  19. public int CurrPageIndex { get; set; }
  20. /// <summary>
  21. /// 每页条数
  22. /// </summary>
  23. public int CurrPageSize { get; set; }
  24. /// <summary>
  25. /// 数据总条数
  26. /// </summary>
  27. public int DataCount { get; set; }
  28. /// <summary>
  29. /// 数据列表
  30. /// </summary>
  31. public List<T> DataList { get; set; }
  32. }
  33. public class DataCount
  34. {
  35. public int Count { get; set; }
  36. }
  37. public class DataCountCost
  38. {
  39. public decimal CountCost { get; set; }
  40. }
  41. /// <summary>
  42. /// 页面功能权限
  43. /// </summary>
  44. public class PageFunAuthViewBase
  45. {
  46. /// <summary>
  47. /// 查看权限
  48. /// 0 否 1 是
  49. /// </summary>
  50. public int CheckAuth { get; set; } = 0;
  51. /// <summary>
  52. /// 删除权限
  53. /// 0 否 1 是
  54. /// </summary>
  55. public int DeleteAuth { get; set; } = 0;
  56. /// <summary>
  57. /// 编辑权限
  58. /// 0 否 1 是
  59. /// </summary>
  60. public int EditAuth { get; set; } = 0;
  61. /// <summary>
  62. /// 文件下载权限
  63. /// 0 否 1 是
  64. /// </summary>
  65. public int FilesDownloadAuth { get; set; } = 0;
  66. /// <summary>
  67. /// 文件上传权限
  68. /// 0 否 1 是
  69. /// </summary>
  70. public int FilesUploadAuth { get; set; } = 0;
  71. /// <summary>
  72. /// 添加权限
  73. /// 0 否 1 是
  74. /// </summary>
  75. public int AddAuth { get; set; } = 0;
  76. /// <summary>
  77. /// 审核权限
  78. /// 0 否 1 是
  79. /// </summary>
  80. public int AuditAuth { get; set; } = 0;
  81. }
  82. public class PageDataViewBase
  83. {
  84. public dynamic Data { get; set; }
  85. public int Total { get; set; }
  86. }
  87. }