using System; using Svrnty.CQRS.Events.Abstractions.Models; using Svrnty.CQRS.Events.Abstractions.Schema; using Svrnty.CQRS.Events.Abstractions.EventStore; using Svrnty.CQRS.Events.Abstractions; namespace Svrnty.Sample.Events; /// /// Base class for all user-related events. /// Inherits auto-managed framework properties (EventId, CorrelationId, OccurredAt) from CorrelatedEvent. /// Used to strongly-type event emissions from user commands. /// public abstract record UserEvent : CorrelatedEvent { } /// /// Event emitted when a user is added. /// Framework automatically manages EventId, CorrelationId, and OccurredAt. /// public sealed record UserAddedEvent : UserEvent { public required int UserId { get; init; } public required string Name { get; init; } public required string Email { get; init; } } /// /// Event emitted when a user is removed. /// Framework automatically manages EventId, CorrelationId, and OccurredAt. /// public sealed record UserRemovedEvent : UserEvent { public required int UserId { get; init; } }