init
This commit is contained in:
31
DouyinApi.EventBus/Eventbus/IntegrationEvent.cs
Normal file
31
DouyinApi.EventBus/Eventbus/IntegrationEvent.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace DouyinApi.EventBus
|
||||
{
|
||||
/// <summary>
|
||||
/// 事件模型
|
||||
/// 基类
|
||||
/// </summary>
|
||||
public class IntegrationEvent
|
||||
{
|
||||
public IntegrationEvent()
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
CreationDate = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
public IntegrationEvent(Guid id, DateTime createDate)
|
||||
{
|
||||
Id = id;
|
||||
CreationDate = createDate;
|
||||
}
|
||||
|
||||
[JsonProperty]
|
||||
public Guid Id { get; private set; }
|
||||
|
||||
[JsonProperty]
|
||||
public DateTime CreationDate { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user