AdoS8Exception.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S8;
  2. /// <summary>
  3. /// 异常主表(业务实体;列表为查询该表及关联展示字段,非独立「列表视图表」)。
  4. /// </summary>
  5. [SugarTable("ado_s8_exception", "S8 异常主表")]
  6. [SugarIndex("uk_ado_s8_exception_tenant_factory_code", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(ExceptionCode), OrderByType.Asc, IsUnique = true)]
  7. public class AdoS8Exception
  8. {
  9. [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  10. public long Id { get; set; }
  11. [SugarColumn(ColumnName = "tenant_id", ColumnDataType = "bigint")]
  12. public long TenantId { get; set; }
  13. [SugarColumn(ColumnName = "factory_id", ColumnDataType = "bigint")]
  14. public long FactoryId { get; set; }
  15. [SugarColumn(ColumnName = "exception_code", Length = 64)]
  16. public string ExceptionCode { get; set; } = string.Empty;
  17. [SugarColumn(ColumnName = "title", Length = 256)]
  18. public string Title { get; set; } = string.Empty;
  19. [SugarColumn(ColumnName = "description", Length = 4000, IsNullable = true)]
  20. public string? Description { get; set; }
  21. [SugarColumn(ColumnName = "scene_code", Length = 64)]
  22. public string SceneCode { get; set; } = string.Empty;
  23. [SugarColumn(ColumnName = "source_type", Length = 32)]
  24. public string SourceType { get; set; } = "MANUAL";
  25. [SugarColumn(ColumnName = "status", Length = 32)]
  26. public string Status { get; set; } = "NEW";
  27. [SugarColumn(ColumnName = "severity", Length = 32)]
  28. public string Severity { get; set; } = "MEDIUM";
  29. [SugarColumn(ColumnName = "priority_score", ColumnDataType = "decimal(10,2)")]
  30. public decimal PriorityScore { get; set; }
  31. [SugarColumn(ColumnName = "priority_level", Length = 16)]
  32. public string PriorityLevel { get; set; } = "P3";
  33. [SugarColumn(ColumnName = "occurrence_dept_id", ColumnDataType = "bigint")]
  34. public long OccurrenceDeptId { get; set; }
  35. [SugarColumn(ColumnName = "responsible_dept_id", ColumnDataType = "bigint")]
  36. public long ResponsibleDeptId { get; set; }
  37. [SugarColumn(ColumnName = "responsible_group_id", ColumnDataType = "bigint", IsNullable = true)]
  38. public long? ResponsibleGroupId { get; set; }
  39. [SugarColumn(ColumnName = "assignee_id", ColumnDataType = "bigint", IsNullable = true)]
  40. public long? AssigneeId { get; set; }
  41. [SugarColumn(ColumnName = "reporter_id", ColumnDataType = "bigint", IsNullable = true)]
  42. public long? ReporterId { get; set; }
  43. [SugarColumn(ColumnName = "sla_deadline", IsNullable = true)]
  44. public DateTime? SlaDeadline { get; set; }
  45. [SugarColumn(ColumnName = "timeout_flag", ColumnDataType = "boolean")]
  46. public bool TimeoutFlag { get; set; }
  47. [SugarColumn(ColumnName = "created_at")]
  48. public DateTime CreatedAt { get; set; } = DateTime.Now;
  49. [SugarColumn(ColumnName = "updated_at", IsNullable = true)]
  50. public DateTime? UpdatedAt { get; set; }
  51. [SugarColumn(ColumnName = "assigned_at", IsNullable = true)]
  52. public DateTime? AssignedAt { get; set; }
  53. [SugarColumn(ColumnName = "closed_at", IsNullable = true)]
  54. public DateTime? ClosedAt { get; set; }
  55. /// <summary>所属模块码(S1-S7),标识异常产生于哪个业务环节</summary>
  56. [SugarColumn(ColumnName = "module_code", Length = 16, IsNullable = true)]
  57. public string? ModuleCode { get; set; }
  58. [SugarColumn(ColumnName = "process_node_code", Length = 64, IsNullable = true)]
  59. public string? ProcessNodeCode { get; set; }
  60. [SugarColumn(ColumnName = "related_object_code", Length = 64, IsNullable = true)]
  61. public string? RelatedObjectCode { get; set; }
  62. /// <summary>当前进行中的审批实例ID(用于并发控制)</summary>
  63. [SugarColumn(ColumnName = "active_flow_instance_id", IsNullable = true)]
  64. public long? ActiveFlowInstanceId { get; set; }
  65. [SugarColumn(ColumnName = "is_deleted", ColumnDataType = "boolean")]
  66. public bool IsDeleted { get; set; }
  67. [SugarColumn(ColumnName = "created_by", Length = 64, IsNullable = true)]
  68. public string? CreatedBy { get; set; }
  69. [SugarColumn(ColumnName = "updated_by", Length = 64, IsNullable = true)]
  70. public string? UpdatedBy { get; set; }
  71. }