namespace WalletService.Domain.Events;

using MediatR;

/// <summary>
/// EN: Domain event raised when wallet balance changes
/// VI: Domain event được phát ra khi số dư ví thay đổi
/// </summary>
public class WalletBalanceChangedDomainEvent : INotification
{
    public Guid WalletId { get; }
    public Guid UserId { get; }
    public string TransactionType { get; }
    public decimal Amount { get; }
    public decimal NewBalance { get; }
    public DateTime OccurredAt { get; }

    public WalletBalanceChangedDomainEvent(
        Guid walletId,
        Guid userId,
        string transactionType,
        decimal amount,
        decimal newBalance)
    {
        WalletId = walletId;
        UserId = userId;
        TransactionType = transactionType;
        Amount = amount;
        NewBalance = newBalance;
        OccurredAt = DateTime.UtcNow;
    }
}
