namespace WalletService.Domain.Events;

using MediatR;

/// <summary>
/// EN: Domain event raised when points are earned
/// VI: Domain event được phát ra khi điểm được tích
/// </summary>
public class PointsEarnedDomainEvent : INotification
{
    public Guid AccountId { get; }
    public Guid UserId { get; }
    public long PointsEarned { get; }
    public long NewBalance { get; }
    public string Source { get; }
    public DateTime OccurredAt { get; }

    public PointsEarnedDomainEvent(
        Guid accountId,
        Guid userId,
        long pointsEarned,
        long newBalance,
        string source)
    {
        AccountId = accountId;
        UserId = userId;
        PointsEarned = pointsEarned;
        NewBalance = newBalance;
        Source = source;
        OccurredAt = DateTime.UtcNow;
    }
}
