mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 10:33:43 +00:00
19 lines
444 B
C#
19 lines
444 B
C#
using System;
|
|
using MediatR;
|
|
|
|
namespace CleanArchitecture.Shared.Events;
|
|
|
|
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;
|
|
}
|
|
} |