RobotTaskCancelledDomainEvent.cs
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
namespace Rcs.Domain.Entities.DomainEvents.Robot
{
/// <summary>
/// 机器人任务取消领域事件
/// 当机器人需要取消当前执行的任务时触发
/// @author zzy
/// </summary>
public sealed record RobotTaskCancelledDomainEvent : IDomainEvent
{
/// <summary>
/// 机器人ID
/// </summary>
public Guid RobotId { get; init; }
/// <summary>
/// 机器人序列号
/// </summary>
public string RobotSerialNumber { get; init; }
/// <summary>
/// 任务号
/// </summary>
public string? OrderId { get; init; }
/// <summary>
/// 事件发生时间
/// </summary>
public DateTime OccurredAt { get; init; }
public RobotTaskCancelledDomainEvent(Guid robotId, string robotSerialNumber, string orderId)
{
RobotId = robotId;
OrderId = orderId;
RobotSerialNumber = robotSerialNumber;
OccurredAt = DateTime.Now;
}
}
}