namespace WalletService.Domain.Events;

using MediatR;

/// <summary>
/// EN: Domain event raised when an escrow hold is created.
/// VI: Domain event được phát ra khi tạo escrow hold.
/// </summary>
public class EscrowHeldDomainEvent : INotification
{
    public Guid WalletId { get; }
    public Guid HoldId { get; }
    public Guid UserId { get; }
    public string ReferenceType { get; }
    public Guid ReferenceId { get; }
    public decimal Amount { get; }
    public int CurrencyTypeId { get; }
    public DateTime OccurredOn { get; }

    public EscrowHeldDomainEvent(
        Guid walletId,
        Guid holdId,
        Guid userId,
        string referenceType,
        Guid referenceId,
        decimal amount,
        int currencyTypeId)
    {
        WalletId = walletId;
        HoldId = holdId;
        UserId = userId;
        ReferenceType = referenceType;
        ReferenceId = referenceId;
        Amount = amount;
        CurrencyTypeId = currencyTypeId;
        OccurredOn = DateTime.UtcNow;
    }
}
