namespace WalletService.Domain.Events;

using MediatR;

/// <summary>
/// EN: Domain event raised when points are spent
/// VI: Domain event được phát ra khi điểm được tiêu
/// </summary>
public class PointsSpentDomainEvent : INotification
{
    public Guid AccountId { get; }
    public Guid UserId { get; }
    public long PointsSpent { get; }
    public long NewBalance { get; }
    public string Source { get; }
    public DateTime OccurredAt { get; }

    public PointsSpentDomainEvent(
        Guid accountId,
        Guid userId,
        long pointsSpent,
        long newBalance,
        string source)
    {
        AccountId = accountId;
        UserId = userId;
        PointsSpent = pointsSpent;
        NewBalance = newBalance;
        Source = source;
        OccurredAt = DateTime.UtcNow;
    }
}
