using HoneyBox.Model.Models.Welfare;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 福利屋服务接口
/// </summary>
public interface IWelfareService
{
    /// <summary>
    /// 获取福利屋列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="type">类型: 1=进行中, 3=已结束</param>
    /// <param name="page">页码</param>
    /// <param name="limit">每页数量</param>
    /// <returns>福利屋列表响应</returns>
    Task<WelfareListResponse> GetWelfareListAsync(int userId, int type, int page, int limit = 15);

    /// <summary>
    /// 获取福利屋列表 (兼容PHP /fuliwu 接口格式)
    /// </summary>
    /// <param name="userId">用户ID (可为0表示未登录)</param>
    /// <param name="type">类型: 1=进行中, 3=已结束</param>
    /// <param name="page">页码</param>
    /// <returns>福利屋列表响应</returns>
    Task<FuliwuListResponse> GetFuliwuListAsync(int userId, int type, int page);

    /// <summary>
    /// 福利屋购买/参与
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">购买请求</param>
    /// <returns>购买响应</returns>
    Task<WelfareBuyResponse> BuyWelfareAsync(int userId, WelfareBuyRequest request);

    /// <summary>
    /// 获取福利屋详情
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="goodsId">商品ID</param>
    /// <returns>福利屋详情响应</returns>
    Task<WelfareDetailResponse> GetWelfareDetailAsync(int userId, int goodsId);

    /// <summary>
    /// 获取参与者列表
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="page">页码</param>
    /// <param name="limit">每页数量</param>
    /// <returns>参与者列表</returns>
    Task<List<ParticipantDto>> GetParticipantsAsync(int goodsId, int page = 1, int limit = 15);

    /// <summary>
    /// 获取开奖记录
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="page">页码</param>
    /// <param name="limit">每页数量</param>
    /// <returns>开奖记录列表</returns>
    Task<List<WinningRecordDto>> GetWinningRecordsAsync(int goodsId, int page = 1, int limit = 15);

    /// <summary>
    /// 获取用户参与记录
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="page">页码</param>
    /// <param name="limit">每页数量</param>
    /// <returns>用户参与记录列表</returns>
    Task<List<UserParticipationDto>> GetUserParticipationRecordsAsync(int userId, int page = 1, int limit = 15);

    /// <summary>
    /// 获取用户中奖记录
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="page">页码</param>
    /// <param name="limit">每页数量</param>
    /// <returns>用户中奖记录列表</returns>
    Task<List<UserWinningDto>> GetUserWinningRecordsAsync(int userId, int page = 1, int limit = 15);
}
