using HoneyBox.Model.Models.Payment;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 充值服务接口
/// 处理余额充值、充值配置查询等功能
/// Requirements: 2.1-2.6
/// </summary>
public interface IRechargeService
{
    /// <summary>
    /// 创建充值订单
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="money">充值金额</param>
    /// <returns>充值订单结果</returns>
    Task<RechargeResult> CreateRechargeOrderAsync(int userId, decimal money);

    /// <summary>
    /// 获取充值配置
    /// </summary>
    /// <returns>充值配置信息</returns>
    Task<RechargeConfigResponse> GetRechargeConfigAsync();

    /// <summary>
    /// 查询支付状态
    /// </summary>
    /// <param name="orderNum">订单号</param>
    /// <returns>支付状态</returns>
    Task<PayStatusResponse> QueryPayStatusAsync(string orderNum);

    /// <summary>
    /// 余额支付
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="orderNum">订单号</param>
    /// <param name="amount">支付金额</param>
    /// <returns>支付结果</returns>
    Task<BalancePayResult> BalancePayAsync(int userId, string orderNum, decimal amount);

    /// <summary>
    /// 处理充值成功回调
    /// </summary>
    /// <param name="orderNum">订单号</param>
    /// <returns>是否处理成功</returns>
    Task<bool> HandleRechargeSuccessAsync(string orderNum);
}
