namespace Admin.NET.Plugin.ApprovalFlow.Service;
///
/// 流程实例详情输出
///
public class FlowInstanceDetailOutput
{
public long Id { get; set; }
public long FlowId { get; set; }
public string BizType { get; set; } = "";
public long BizId { get; set; }
public string? BizNo { get; set; }
public string Title { get; set; } = "";
public long InitiatorId { get; set; }
public string? InitiatorName { get; set; }
public FlowInstanceStatusEnum Status { get; set; }
public string? CurrentNodeId { get; set; }
public DateTime StartTime { get; set; }
public DateTime? EndTime { get; set; }
/// 流程 JSON 快照(发起时冻结的版本),前端可用来渲染流程图
public string? FlowJsonSnapshot { get; set; }
public List Tasks { get; set; } = new();
///
/// 已完成节点 Id 列表(来自 ApprovalFlowCompletedNode 子表,含 userTask 与网关节点)
///
public List CompletedNodeIds { get; set; } = new();
///
/// 当前进行中的节点 Id 列表(Pending 任务 NodeId 去重;并行场景下会有多项)
///
public List CurrentNodeIds { get; set; } = new();
}
///
/// 审批任务输出
///
public class FlowTaskOutput
{
public long Id { get; set; }
public string NodeId { get; set; } = "";
public string? NodeName { get; set; }
public long AssigneeId { get; set; }
public string? AssigneeName { get; set; }
public FlowTaskStatusEnum Status { get; set; }
public string? Comment { get; set; }
public DateTime? ActionTime { get; set; }
/// 是否为代理任务
public bool IsDelegate { get; set; }
/// 被代理人(原审批人)Id
public long? DelegateForUserId { get; set; }
/// 被代理人(原审批人)姓名
public string? DelegateForUserName { get; set; }
}
///
/// 审批时间线条目
///
public class FlowTimelineItem
{
public long Id { get; set; }
public string? NodeId { get; set; }
public string? NodeName { get; set; }
public FlowLogActionEnum Action { get; set; }
public long OperatorId { get; set; }
public string? OperatorName { get; set; }
public string? Comment { get; set; }
public DateTime CreateTime { get; set; }
}
///
/// 流程实例分页查询输入
///
public class InstancePageInput : BasePageInput
{
public string? BizType { get; set; }
public FlowInstanceStatusEnum? Status { get; set; }
}
///
/// 流程实例分页输出
///
public class InstancePageOutput
{
public long Id { get; set; }
public string BizType { get; set; } = "";
public long BizId { get; set; }
public string? BizNo { get; set; }
public string Title { get; set; } = "";
public FlowInstanceStatusEnum Status { get; set; }
public string? CurrentNodeId { get; set; }
public DateTime StartTime { get; set; }
public DateTime? EndTime { get; set; }
public string? InitiatorName { get; set; }
///
/// 当前待审批人姓名(多人逗号分隔)
///
public string? CurrentAssigneeName { get; set; }
}