using HoneyBox.Model.Models;
using HoneyBox.Model.Models.Order;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 仓库服务接口
/// </summary>
public interface IWarehouseService
{
    #region 仓库查询

    /// <summary>
    /// 获取仓库首页（盒柜）
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">仓库首页请求</param>
    /// <returns>仓库首页响应</returns>
    Task<WarehouseIndexResponseDto> GetWarehouseIndexAsync(int userId, WarehouseIndexRequest request);

    #endregion

    #region 奖品回收

    /// <summary>
    /// 奖品回收
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">回收请求</param>
    /// <returns>回收结果</returns>
    Task<RecoveryResultDto> RecoveryPrizesAsync(int userId, RecoveryRequest request);

    #endregion

    #region 奖品发货

    /// <summary>
    /// 奖品发货申请
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">发货请求</param>
    /// <returns>发货结果</returns>
    Task<SendResultDto> SendPrizesAsync(int userId, SendRequest request);

    /// <summary>
    /// 确认发货
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="id">发货记录ID</param>
    /// <returns>是否成功</returns>
    Task<bool> ConfirmSendAsync(int userId, int id);

    #endregion

    #region 记录查询

    /// <summary>
    /// 获取发货记录列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="page">页码</param>
    /// <param name="status">状态筛选：1=待发货，2=待收货，3=已完成</param>
    /// <returns>发货记录列表</returns>
    Task<PageResponse<SendRecordDto>> GetSendRecordsAsync(int userId, int page, int status = 1);

    /// <summary>
    /// 获取发货记录详情
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="id">发货记录ID</param>
    /// <returns>发货记录详情</returns>
    Task<SendRecordDetailDto> GetSendRecordDetailAsync(int userId, int id);

    /// <summary>
    /// 获取回收记录列表
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="page">页码</param>
    /// <returns>回收记录列表</returns>
    Task<PageResponse<RecoveryRecordDto>> GetRecoveryRecordsAsync(int userId, int page);

    #endregion

    #region 物流查询

    /// <summary>
    /// 获取物流信息
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="id">发货记录ID</param>
    /// <returns>物流信息</returns>
    Task<LogisticsDto> GetLogisticsAsync(int userId, int id);

    #endregion

    #region 保险柜操作

    /// <summary>
    /// 移入保险柜
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">移入请求</param>
    /// <returns>操作结果</returns>
    Task<bool> MoveIntoSafeAsync(int userId, SafeOperationRequest request);

    /// <summary>
    /// 移出保险柜
    /// </summary>
    /// <param name="userId">用户ID</param>
    /// <param name="request">移出请求</param>
    /// <returns>操作结果</returns>
    Task<bool> RemoveFromSafeAsync(int userId, SafeOperationRequest request);

    #endregion
}
