AdoSmartOpsKpiMasterDtos.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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? DataSource { get; set; }
  20. public string? StatFrequency { get; set; }
  21. public string? Department { get; set; }
  22. public string? DopFields { get; set; }
  23. public string? Unit { get; set; }
  24. public string Direction { get; set; } = "higher_is_better";
  25. public decimal? YellowThreshold { get; set; }
  26. public decimal? RedThreshold { get; set; }
  27. public bool IsHomePage { get; set; }
  28. public int SortNo { get; set; }
  29. public string? Remark { get; set; }
  30. public bool IsEnabled { get; set; } = true;
  31. }
  32. // ── 树节点(前端左侧树用) ──
  33. public class KpiMasterTreeNodeDto
  34. {
  35. public long Id { get; set; }
  36. public string MetricCode { get; set; } = string.Empty;
  37. public string ModuleCode { get; set; } = string.Empty;
  38. public int MetricLevel { get; set; }
  39. public string MetricName { get; set; } = string.Empty;
  40. public long? ParentId { get; set; }
  41. public int SortNo { get; set; }
  42. public bool IsEnabled { get; set; }
  43. public List<KpiMasterTreeNodeDto> Children { get; set; } = new();
  44. }
  45. // ── 详情(右侧面板用) ──
  46. public class KpiMasterDetailDto
  47. {
  48. public long Id { get; set; }
  49. public string MetricCode { get; set; } = string.Empty;
  50. public string ModuleCode { get; set; } = string.Empty;
  51. public int MetricLevel { get; set; }
  52. public long? ParentId { get; set; }
  53. public string? ParentName { get; set; }
  54. public string MetricName { get; set; } = string.Empty;
  55. public string? Description { get; set; }
  56. public string? Formula { get; set; }
  57. public string? CalcRule { get; set; }
  58. public string? DataSource { get; set; }
  59. public string? StatFrequency { get; set; }
  60. public string? Department { get; set; }
  61. public string? DopFields { get; set; }
  62. public string? Unit { get; set; }
  63. public string Direction { get; set; } = string.Empty;
  64. public decimal? YellowThreshold { get; set; }
  65. public decimal? RedThreshold { get; set; }
  66. public bool IsHomePage { get; set; }
  67. public int SortNo { get; set; }
  68. public string? Remark { get; set; }
  69. public bool IsEnabled { get; set; }
  70. public long TenantId { get; set; }
  71. public DateTime CreatedAt { get; set; }
  72. public DateTime? UpdatedAt { get; set; }
  73. }
  74. // ── 排序 ──
  75. public class KpiMasterSortItemDto
  76. {
  77. public long Id { get; set; }
  78. public int SortNo { get; set; }
  79. }
  80. // ── 移动(拖拽) ──
  81. public class KpiMasterMoveDto
  82. {
  83. public long? NewParentId { get; set; }
  84. public int NewSortNo { get; set; }
  85. }