ApprovalFlowInstance.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. namespace Admin.NET.Plugin.ApprovalFlow;
  2. /// <summary>
  3. /// 审批流程实例表
  4. /// </summary>
  5. [SugarTable(null, "审批流程实例表")]
  6. [SugarIndex("idx_flowinstance_biztype_bizid", nameof(BizType), OrderByType.Asc, nameof(BizId), OrderByType.Asc)]
  7. [SugarIndex("idx_flowinstance_initiator", nameof(InitiatorId), OrderByType.Asc)]
  8. public class ApprovalFlowInstance : EntityBaseOrg
  9. {
  10. /// <summary>
  11. /// 关联流程定义 Id
  12. /// </summary>
  13. [SugarColumn(ColumnDescription = "流程定义Id")]
  14. public long FlowId { get; set; }
  15. /// <summary>
  16. /// 发起时的流程版本
  17. /// </summary>
  18. [SugarColumn(ColumnDescription = "流程版本")]
  19. public int FlowVersion { get; set; }
  20. /// <summary>
  21. /// 业务类型编码
  22. /// </summary>
  23. [SugarColumn(ColumnDescription = "业务类型编码", Length = 64)]
  24. [MaxLength(64)]
  25. public string BizType { get; set; } = "";
  26. /// <summary>
  27. /// 关联业务单据 Id
  28. /// </summary>
  29. [SugarColumn(ColumnDescription = "业务单据Id")]
  30. public long BizId { get; set; }
  31. /// <summary>
  32. /// 业务单号(冗余)
  33. /// </summary>
  34. [SugarColumn(ColumnDescription = "业务单号", Length = 128, IsNullable = true)]
  35. [MaxLength(128)]
  36. public string? BizNo { get; set; }
  37. /// <summary>
  38. /// 流程标题
  39. /// </summary>
  40. [SugarColumn(ColumnDescription = "流程标题", Length = 256)]
  41. [MaxLength(256)]
  42. public string Title { get; set; } = "";
  43. /// <summary>
  44. /// 发起人 Id
  45. /// </summary>
  46. [SugarColumn(ColumnDescription = "发起人Id")]
  47. public long InitiatorId { get; set; }
  48. /// <summary>
  49. /// 发起人姓名(冗余)
  50. /// </summary>
  51. [SugarColumn(ColumnDescription = "发起人姓名", Length = 64, IsNullable = true)]
  52. [MaxLength(64)]
  53. public string? InitiatorName { get; set; }
  54. /// <summary>
  55. /// 流程状态
  56. /// </summary>
  57. [SugarColumn(ColumnDescription = "流程状态")]
  58. public FlowInstanceStatusEnum Status { get; set; }
  59. /// <summary>
  60. /// 当前所在节点 Id
  61. /// </summary>
  62. [SugarColumn(ColumnDescription = "当前节点Id", Length = 64, IsNullable = true)]
  63. [MaxLength(64)]
  64. public string? CurrentNodeId { get; set; }
  65. /// <summary>
  66. /// 发起时的完整 FlowJson 快照(含节点属性)
  67. /// </summary>
  68. [SugarColumn(ColumnDescription = "FlowJson快照", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  69. public string? FlowJsonSnapshot { get; set; }
  70. /// <summary>
  71. /// 发起时间
  72. /// </summary>
  73. [SugarColumn(ColumnDescription = "发起时间")]
  74. public DateTime StartTime { get; set; }
  75. /// <summary>
  76. /// 结束时间
  77. /// </summary>
  78. [SugarColumn(ColumnDescription = "结束时间", IsNullable = true)]
  79. public DateTime? EndTime { get; set; }
  80. }