0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-06-30 02:31:08 +00:00
CleanArchitecture/CleanArchitecture.Domain/DomainEvents/DomainEvent.cs
2023-08-31 18:19:17 +02:00

19 lines
450 B
C#

using System;
using MediatR;
namespace CleanArchitecture.Domain.DomainEvents;
public abstract class DomainEvent : Message, INotification
{
public DateTime Timestamp { get; private set; }
protected DomainEvent(Guid aggregateId) : base(aggregateId)
{
Timestamp = DateTime.Now;
}
protected DomainEvent(Guid aggregateId, string? messageType) : base(aggregateId, messageType)
{
Timestamp = DateTime.Now;
}
}