AdoSmartOpsImprovementPlan.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. using Admin.NET.Core;
  2. namespace Admin.NET.Plugin.AiDOP.Entity;
  3. /// <summary>
  4. /// 智慧诊断改善计划。
  5. /// </summary>
  6. [SugarTable("ado_smart_ops_improvement_plan", "智慧诊断改善计划")]
  7. [SugarIndex("uk_smart_ops_improve_tenant_plan", nameof(TenantId), OrderByType.Asc, nameof(PlanNo), OrderByType.Asc, IsUnique = true)]
  8. [SugarIndex("idx_smart_ops_improve_tenant_module", nameof(TenantId), OrderByType.Asc, nameof(ModuleCode), OrderByType.Asc)]
  9. [SugarIndex("idx_smart_ops_improve_query", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(ModuleCode), OrderByType.Asc, nameof(Status), OrderByType.Asc)]
  10. [SugarIndex("idx_smart_ops_improve_owner", nameof(TenantId), OrderByType.Asc, nameof(OwnerUserId), OrderByType.Asc)]
  11. [SugarIndex("idx_smart_ops_improve_due", nameof(TenantId), OrderByType.Asc, nameof(DueDate), OrderByType.Asc)]
  12. [SugarIndex("idx_smart_ops_improve_flow", nameof(FlowInstanceId), OrderByType.Asc)]
  13. public class AdoSmartOpsImprovementPlan : ITenantIdFilter
  14. {
  15. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  16. public long Id { get; set; }
  17. [SugarColumn(ColumnDescription = "租户")]
  18. public long? TenantId { get; set; }
  19. [SugarColumn(ColumnDescription = "工厂")]
  20. public long FactoryId { get; set; } = 1;
  21. [SugarColumn(ColumnDescription = "计划单号", Length = 64)]
  22. public string PlanNo { get; set; } = string.Empty;
  23. [SugarColumn(ColumnDescription = "模块编码", Length = 20)]
  24. public string ModuleCode { get; set; } = string.Empty;
  25. [SugarColumn(ColumnDescription = "诊断根指标编码", Length = 64, IsNullable = true)]
  26. public string? MetricCode { get; set; }
  27. [SugarColumn(ColumnDescription = "问题层级")]
  28. public int ProblemLevel { get; set; }
  29. [SugarColumn(ColumnDescription = "问题指标编码", Length = 64, IsNullable = true)]
  30. public string? ProblemMetricCode { get; set; }
  31. [SugarColumn(ColumnDescription = "问题名称", Length = 200)]
  32. public string ProblemName { get; set; } = string.Empty;
  33. [SugarColumn(ColumnDescription = "责任部门", Length = 200, IsNullable = true)]
  34. public string? ProblemDept { get; set; }
  35. [SugarColumn(ColumnDescription = "问题严重度 red/yellow", Length = 16, IsNullable = true)]
  36. public string? ProblemSeverity { get; set; }
  37. [SugarColumn(ColumnDescription = "是否跨部门")]
  38. public bool IsCrossDept { get; set; }
  39. [SugarColumn(ColumnDescription = "目标值", Length = 64, IsNullable = true)]
  40. public string? TargetValue { get; set; }
  41. [SugarColumn(ColumnDescription = "实际值", Length = 64, IsNullable = true)]
  42. public string? ActualValue { get; set; }
  43. [SugarColumn(ColumnDescription = "差距", Length = 64, IsNullable = true)]
  44. public string? GapLabel { get; set; }
  45. [SugarColumn(ColumnDescription = "根因分析", ColumnDataType = "text", IsNullable = true)]
  46. public string? RootCause { get; set; }
  47. [SugarColumn(ColumnDescription = "行动项 JSON", ColumnDataType = "text", IsNullable = true)]
  48. public string? ActionItemsJson { get; set; }
  49. [SugarColumn(ColumnDescription = "责任人", IsNullable = true)]
  50. public long? OwnerUserId { get; set; }
  51. [SugarColumn(ColumnDescription = "计划完成日期", IsNullable = true)]
  52. public DateTime? DueDate { get; set; }
  53. [SugarColumn(ColumnDescription = "状态", Length = 32)]
  54. public string Status { get; set; } = "draft";
  55. [SugarColumn(ColumnDescription = "审批实例 Id", IsNullable = true)]
  56. public long? FlowInstanceId { get; set; }
  57. [SugarColumn(ColumnDescription = "验证结论", Length = 32, IsNullable = true)]
  58. public string? VerifyResult { get; set; }
  59. [SugarColumn(ColumnDescription = "验证值", Length = 64, IsNullable = true)]
  60. public string? VerifyValue { get; set; }
  61. [SugarColumn(ColumnDescription = "验证备注", ColumnDataType = "text", IsNullable = true)]
  62. public string? VerifyRemark { get; set; }
  63. [SugarColumn(ColumnDescription = "自动有效性结论", Length = 32, IsNullable = true)]
  64. public string? AutoVerifyResult { get; set; }
  65. [SugarColumn(ColumnDescription = "自动有效性证据", ColumnDataType = "text", IsNullable = true)]
  66. public string? AutoVerifyJson { get; set; }
  67. [SugarColumn(ColumnDescription = "自动评价时间", IsNullable = true)]
  68. public DateTime? AutoVerifyTime { get; set; }
  69. [SugarColumn(ColumnDescription = "创建时间")]
  70. public DateTime CreateTime { get; set; } = DateTime.Now;
  71. [SugarColumn(ColumnDescription = "更新时间")]
  72. public DateTime UpdateTime { get; set; } = DateTime.Now;
  73. }