TaskFailedDomainEvent.cs
561 Bytes
namespace Rcs.Domain.Entities.DomainEvents.RobotTask
{
/// <summary>
/// 任务失败领域事件
/// @author zzy
/// </summary>
public sealed record TaskFailedDomainEvent : IDomainEvent
{
public Guid TaskId { get; init; }
public string? ErrorInfo { get; init; }
public DateTime OccurredAt { get; init; }
public TaskFailedDomainEvent(Guid taskId, string? errorInfo = null)
{
TaskId = taskId;
ErrorInfo = errorInfo;
OccurredAt = DateTime.Now;
}
}
}