Files
2025-10-27 17:39:18 -04:00

23 lines
623 B
C#

using System.ComponentModel.DataAnnotations.Schema;
using Prefab.Base;
namespace Prefab.Domain.Common;
/// <summary>
/// Base type for domain events captured during aggregate processing.
/// </summary>
[NotMapped]
public abstract record Event : IEvent
{
/// <summary>
/// Gets a value indicating whether the event has been dispatched to external transports.
/// </summary>
public bool IsPublished { get; internal set; }
/// <summary>
/// Gets the timestamp for when the event occurred.
/// </summary>
public DateTimeOffset DateOccurred { get; protected set; } = DateTimeOffset.UtcNow;
}