AdoSmartOpsKpiMasterDtos.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. namespace Admin.NET.Plugin.AiDOP.Dto.SmartOps;
  2. // ── 查询 ──
  3. public class KpiMasterQueryDto
  4. {
  5. public string? ModuleCode { get; set; }
  6. public string? Keyword { get; set; }
  7. public int? MetricLevel { get; set; }
  8. }
  9. // ── 新增 / 编辑 ──
  10. public class KpiMasterUpsertDto
  11. {
  12. public string ModuleCode { get; set; } = string.Empty;
  13. public int MetricLevel { get; set; }
  14. public long? ParentId { get; set; }
  15. public string MetricName { get; set; } = string.Empty;
  16. public string? Description { get; set; }
  17. public string? Formula { get; set; }
  18. public string? CalcRule { get; set; }
  19. public string? FormulaExpr { get; set; }
  20. public string? DataSource { get; set; }
  21. public string? StatFrequency { get; set; }
  22. public string? Department { get; set; }
  23. public string? DopFields { get; set; }
  24. public string? Unit { get; set; }
  25. public string Direction { get; set; } = "higher_is_better";
  26. public decimal? YellowThreshold { get; set; }
  27. public decimal? RedThreshold { get; set; }
  28. public bool IsHomePage { get; set; }
  29. public int SortNo { get; set; }
  30. public string? Remark { get; set; }
  31. public bool IsEnabled { get; set; } = true;
  32. }
  33. // ── 树节点(前端左侧树用) ──
  34. public class KpiMasterTreeNodeDto
  35. {
  36. public long Id { get; set; }
  37. public string MetricCode { get; set; } = string.Empty;
  38. public string ModuleCode { get; set; } = string.Empty;
  39. public int MetricLevel { get; set; }
  40. public string MetricName { get; set; } = string.Empty;
  41. public long? ParentId { get; set; }
  42. public int SortNo { get; set; }
  43. public bool IsEnabled { get; set; }
  44. public List<KpiMasterTreeNodeDto> Children { get; set; } = new();
  45. }
  46. // ── 详情(右侧面板用) ──
  47. public class KpiMasterDetailDto
  48. {
  49. public long Id { get; set; }
  50. public string MetricCode { get; set; } = string.Empty;
  51. public string ModuleCode { get; set; } = string.Empty;
  52. public int MetricLevel { get; set; }
  53. public long? ParentId { get; set; }
  54. public string? ParentName { get; set; }
  55. public string MetricName { get; set; } = string.Empty;
  56. public string? Description { get; set; }
  57. public string? Formula { get; set; }
  58. public string? CalcRule { get; set; }
  59. public string? FormulaExpr { get; set; }
  60. public string? FormulaPreview { get; set; }
  61. public string? FormulaRefs { get; set; }
  62. public string? DataSource { get; set; }
  63. public string? StatFrequency { get; set; }
  64. public string? Department { get; set; }
  65. public string? DopFields { get; set; }
  66. public string? Unit { get; set; }
  67. public string Direction { get; set; } = string.Empty;
  68. public decimal? YellowThreshold { get; set; }
  69. public decimal? RedThreshold { get; set; }
  70. public bool IsHomePage { get; set; }
  71. public int SortNo { get; set; }
  72. public string? Remark { get; set; }
  73. public bool IsEnabled { get; set; }
  74. public long TenantId { get; set; }
  75. public DateTime CreatedAt { get; set; }
  76. public DateTime? UpdatedAt { get; set; }
  77. }
  78. // ── 排序 ──
  79. public class KpiMasterSortItemDto
  80. {
  81. public long Id { get; set; }
  82. public int SortNo { get; set; }
  83. }
  84. // ── 移动(拖拽) ──
  85. public class KpiMasterMoveDto
  86. {
  87. public long? NewParentId { get; set; }
  88. public int NewSortNo { get; set; }
  89. }