using HoneyBox.Model.Models;
using HoneyBox.Model.Models.Goods;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 商品服务接口
/// </summary>
public interface IGoodsService
{
    /// <summary>
    /// 获取商品列表
    /// </summary>
    /// <param name="request">查询请求</param>
    /// <param name="userId">用户ID</param>
    /// <returns>分页商品列表</returns>
    Task<PageResponse<GoodsListDto>> GetGoodsListAsync(GoodsListRequest request, int userId);

    /// <summary>
    /// 获取商品详情
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="goodsNum">箱号 (0表示自动选择)</param>
    /// <param name="userId">用户ID</param>
    /// <returns>商品详情</returns>
    Task<GoodsDetailResponseDto> GetGoodsDetailAsync(int goodsId, int goodsNum, int userId);

    /// <summary>
    /// 获取商品子奖品列表
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="goodsNum">箱号</param>
    /// <param name="goodsListId">奖品列表ID</param>
    /// <returns>子奖品列表</returns>
    Task<List<GoodsChildrenDto>> GetGoodsChildrenAsync(int goodsId, int goodsNum, int goodsListId);

    /// <summary>
    /// 获取商品扩展配置
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="goodsType">商品类型</param>
    /// <returns>扩展配置</returns>
    Task<GoodsExtendDto> GetGoodsExtendAsync(int goodsId, int goodsType);

    /// <summary>
    /// 获取箱号列表
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <returns>箱号分组列表</returns>
    Task<List<BoxGroupDto>> GetBoxListAsync(int goodsId);

    /// <summary>
    /// 获取箱号详情
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="pageNo">页码</param>
    /// <param name="sort">排序方式: 0=箱号升序, 1=箱号降序, 2=余量降序</param>
    /// <returns>箱号详情列表</returns>
    Task<List<BoxDetailDto>> GetBoxDetailAsync(int goodsId, int pageNo, int sort);

    /// <summary>
    /// 获取无限赏商品详情
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="userId">用户ID</param>
    /// <returns>无限赏商品详情</returns>
    Task<InfiniteGoodsDetailResponseDto> GetInfiniteGoodsDetailAsync(int goodsId, int userId);

    /// <summary>
    /// 获取连击赏商品详情
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="type">类型: 0=普通池, 1=秘宝池</param>
    /// <param name="userId">用户ID</param>
    /// <returns>连击赏商品详情</returns>
    Task<ComboGoodsDetailResponseDto> GetComboGoodsDetailAsync(int goodsId, int type, int userId);

    /// <summary>
    /// 获取一番赏中奖记录
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="goodsNum">箱号</param>
    /// <param name="shangId">赏品分类ID (0表示全部)</param>
    /// <param name="page">页码</param>
    /// <param name="pageSize">每页数量</param>
    /// <returns>中奖记录</returns>
    Task<ShangLogResponseDto> GetShangLogAsync(int goodsId, int goodsNum, int shangId, int page, int pageSize);

    /// <summary>
    /// 获取领主王数据
    /// </summary>
    /// <param name="goodsId">商品ID</param>
    /// <param name="type">类型: 1=挑战人数, 2=领主记录</param>
    /// <param name="page">页码</param>
    /// <param name="pageSize">每页数量</param>
    /// <returns>领主王数据</returns>
    Task<LingZhuKingResponseDto> GetLingZhuKingAsync(int goodsId, int type, int page, int pageSize);
}
