RobotPauseDomainEvent.cs 772 Bytes
namespace Rcs.Domain.Entities.DomainEvents.Robot;

/// <summary>
/// 机器人任务取消领域事件
/// 当机器人需要取消当前执行的任务时触发
/// @author zzy
/// </summary>
public sealed record RobotPauseDomainEvent : IDomainEvent
{
    /// <summary>
    /// 机器人ID
    /// </summary>
    public Guid RobotId { get; init; }

    /// <summary>
    /// 机器人序列号
    /// </summary>
    public string RobotSerialNumber { get; init; }

    /// <summary>
    /// 事件发生时间
    /// </summary>
    public DateTime OccurredAt { get; init; }

    public RobotPauseDomainEvent(Guid robotId, string robotSerialNumber)
    {
        RobotId = robotId;
        RobotSerialNumber = robotSerialNumber;
        OccurredAt = DateTime.Now;
    }
}