分布式事件的设计与抽象

This commit is contained in:
administrator committed 2024-09-12 22:01:35 +08:00
1 parent fb424749c0
commit dbfb59f461
9 files changed
+148 -5

No files matched your search

@@ -0,0 +1,24 @@
// Copyright (c) HelloShop Corporation. All rights reserved.
// See the license file in the project root for more information.
using System.Text.Json;
using System.Text.Json.Serialization;
namespace HelloShop.ServiceDefaults.DistributedEvents.Abstractions
{
public record DistributedEvent
{
public DistributedEvent()
{
Id = Guid.NewGuid();
CreationTime = DateTimeOffset.UtcNow;
}
public Guid Id { get; set; }
public DateTimeOffset CreationTime { get; set; }
[JsonExtensionData]
public Dictionary<string, JsonElement>? ExtensionData { get; set; }
}
}