AdoS8ExceptionTimeline.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S8;
  2. [SugarTable("ado_s8_exception_timeline", "S8 异常时间线")]
  3. public class AdoS8ExceptionTimeline
  4. {
  5. [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  6. public long Id { get; set; }
  7. [SugarColumn(ColumnName = "exception_id", ColumnDataType = "bigint")]
  8. public long ExceptionId { get; set; }
  9. [SugarColumn(ColumnName = "action_code", Length = 64)]
  10. public string ActionCode { get; set; } = string.Empty;
  11. [SugarColumn(ColumnName = "action_label", Length = 128)]
  12. public string ActionLabel { get; set; } = string.Empty;
  13. [SugarColumn(ColumnName = "from_status", Length = 32, IsNullable = true)]
  14. public string? FromStatus { get; set; }
  15. [SugarColumn(ColumnName = "to_status", Length = 32, IsNullable = true)]
  16. public string? ToStatus { get; set; }
  17. /// <summary>
  18. /// 操作人。<b>SYSUSER ID ONLY</b> —— 值域是 <c>SysUser.Id</c>。
  19. ///
  20. /// <para>列名从 <c>operator_id</c> 显式改为 <c>operator_user_id</c>(迁移 1.0.496)。
  21. /// 旧列<b>实测混装两套 ID 空间</b>:CLAIM 写的是 EmployeeMaster.RecID(19 行),
  22. /// 而 START_PROGRESS / VERIFY_* / CREATE 写的是 SysUser.Id —— 同一列、同一张表、语义按动作而异。
  23. /// 于是「谁做的这一步」这个最基本的问题,在时间线上无法回答。</para>
  24. ///
  25. /// <para>系统自动动作允许为 NULL(没有真人操作者),<b>但绝不允许伪造一个 ID 填进来</b>。</para>
  26. /// </summary>
  27. [SugarColumn(ColumnName = "operator_user_id", ColumnDataType = "bigint", IsNullable = true)]
  28. public long? OperatorUserId { get; set; }
  29. [SugarColumn(ColumnName = "operator_name", Length = 128, IsNullable = true)]
  30. public string? OperatorName { get; set; }
  31. [SugarColumn(ColumnName = "action_remark", Length = 2000, IsNullable = true)]
  32. public string? ActionRemark { get; set; }
  33. [SugarColumn(ColumnName = "created_at")]
  34. public DateTime CreatedAt { get; set; } = DateTime.Now;
  35. }