namespace Admin.NET.Plugin.ApprovalFlow;
///
/// 审批任务表
///
[SugarTable(null, "审批任务表")]
[SugarIndex("idx_flowtask_instance", nameof(InstanceId), OrderByType.Asc)]
[SugarIndex("idx_flowtask_assignee_status", nameof(AssigneeId), OrderByType.Asc, nameof(Status), OrderByType.Asc)]
public class ApprovalFlowTask : EntityBaseOrg
{
///
/// 关联流程实例 Id
///
[SugarColumn(ColumnDescription = "流程实例Id")]
public long InstanceId { get; set; }
///
/// 对应 FlowJson 中的 node.id
///
[SugarColumn(ColumnDescription = "节点Id", Length = 64)]
[MaxLength(64)]
public string NodeId { get; set; } = "";
///
/// 节点名称(冗余)
///
[SugarColumn(ColumnDescription = "节点名称", Length = 128, IsNullable = true)]
[MaxLength(128)]
public string? NodeName { get; set; }
///
/// 指派审批人 Id
///
[SugarColumn(ColumnDescription = "审批人Id")]
public long AssigneeId { get; set; }
///
/// 审批人姓名(冗余)
///
[SugarColumn(ColumnDescription = "审批人姓名", Length = 64, IsNullable = true)]
[MaxLength(64)]
public string? AssigneeName { get; set; }
///
/// 任务状态
///
[SugarColumn(ColumnDescription = "任务状态")]
public FlowTaskStatusEnum Status { get; set; }
///
/// 审批意见
///
[SugarColumn(ColumnDescription = "审批意见", Length = 1024, IsNullable = true)]
[MaxLength(1024)]
public string? Comment { get; set; }
///
/// 操作时间
///
[SugarColumn(ColumnDescription = "操作时间", IsNullable = true)]
public DateTime? ActionTime { get; set; }
///
/// 转办目标人 Id
///
[SugarColumn(ColumnDescription = "转办目标人Id", IsNullable = true)]
public long? TransferToId { get; set; }
///
/// 是否为加签产生的任务
///
[SugarColumn(ColumnDescription = "是否加签任务", DefaultValue = "0")]
public bool IsAddSign { get; set; }
///
/// 加签发起人 Id
///
[SugarColumn(ColumnDescription = "加签发起人Id", IsNullable = true)]
public long? AddSignById { get; set; }
}