using Managing.Domain.Users;

namespace Managing.Application.Abstractions.Services;

public interface IKaigenService
{
    /// <summary>
    /// Debits user credits for a backtest operation
    /// </summary>
    /// <param name="user">The user to debit</param>
    /// <param name="debitAmount">The amount to debit</param>
    /// <returns>The request ID for tracking</returns>
    Task<string> DebitUserCreditsAsync(User user, decimal debitAmount);

    /// <summary>
    /// Refunds user credits if debit operation fails
    /// </summary>
    /// <param name="requestId">The original request ID from debit operation</param>
    /// <param name="user">The user to refund</param>
    /// <returns>True if refund was successful</returns>
    Task<bool> RefundUserCreditsAsync(string requestId, User user);
}