ApprovalFlowTask.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. namespace Admin.NET.Plugin.ApprovalFlow;
  2. /// <summary>
  3. /// 审批任务表
  4. /// </summary>
  5. [SugarTable(null, "审批任务表")]
  6. [SugarIndex("idx_flowtask_instance", nameof(InstanceId), OrderByType.Asc)]
  7. [SugarIndex("idx_flowtask_assignee_status", nameof(AssigneeId), OrderByType.Asc, nameof(Status), OrderByType.Asc)]
  8. public class ApprovalFlowTask : EntityBaseOrg
  9. {
  10. /// <summary>
  11. /// 关联流程实例 Id
  12. /// </summary>
  13. [SugarColumn(ColumnDescription = "流程实例Id")]
  14. public long InstanceId { get; set; }
  15. /// <summary>
  16. /// 对应 FlowJson 中的 node.id
  17. /// </summary>
  18. [SugarColumn(ColumnDescription = "节点Id", Length = 64)]
  19. [MaxLength(64)]
  20. public string NodeId { get; set; } = "";
  21. /// <summary>
  22. /// 节点名称(冗余)
  23. /// </summary>
  24. [SugarColumn(ColumnDescription = "节点名称", Length = 128, IsNullable = true)]
  25. [MaxLength(128)]
  26. public string? NodeName { get; set; }
  27. /// <summary>
  28. /// 指派审批人 Id
  29. /// </summary>
  30. [SugarColumn(ColumnDescription = "审批人Id")]
  31. public long AssigneeId { get; set; }
  32. /// <summary>
  33. /// 审批人姓名(冗余)
  34. /// </summary>
  35. [SugarColumn(ColumnDescription = "审批人姓名", Length = 64, IsNullable = true)]
  36. [MaxLength(64)]
  37. public string? AssigneeName { get; set; }
  38. /// <summary>
  39. /// 任务状态
  40. /// </summary>
  41. [SugarColumn(ColumnDescription = "任务状态")]
  42. public FlowTaskStatusEnum Status { get; set; }
  43. /// <summary>
  44. /// 审批意见
  45. /// </summary>
  46. [SugarColumn(ColumnDescription = "审批意见", Length = 1024, IsNullable = true)]
  47. [MaxLength(1024)]
  48. public string? Comment { get; set; }
  49. /// <summary>
  50. /// 操作时间
  51. /// </summary>
  52. [SugarColumn(ColumnDescription = "操作时间", IsNullable = true)]
  53. public DateTime? ActionTime { get; set; }
  54. /// <summary>
  55. /// 转办目标人 Id
  56. /// </summary>
  57. [SugarColumn(ColumnDescription = "转办目标人Id", IsNullable = true)]
  58. public long? TransferToId { get; set; }
  59. /// <summary>
  60. /// 是否为加签产生的任务
  61. /// </summary>
  62. [SugarColumn(ColumnDescription = "是否加签任务", DefaultValue = "0")]
  63. public bool IsAddSign { get; set; }
  64. /// <summary>
  65. /// 加签发起人 Id
  66. /// </summary>
  67. [SugarColumn(ColumnDescription = "加签发起人Id", IsNullable = true)]
  68. public long? AddSignById { get; set; }
  69. /// <summary>
  70. /// 是否为代理人任务(委托产生的并行任务)
  71. /// </summary>
  72. [SugarColumn(ColumnDescription = "是否代理任务", DefaultValue = "0")]
  73. public bool IsDelegate { get; set; }
  74. /// <summary>
  75. /// 被代理人(原审批人)Id — IsDelegate=true 时有值
  76. /// </summary>
  77. [SugarColumn(ColumnDescription = "被代理人Id", IsNullable = true)]
  78. public long? DelegateForUserId { get; set; }
  79. /// <summary>
  80. /// 被代理人姓名(冗余)
  81. /// </summary>
  82. [SugarColumn(ColumnDescription = "被代理人姓名", Length = 64, IsNullable = true)]
  83. [MaxLength(64)]
  84. public string? DelegateForUserName { get; set; }
  85. }