using HoneyBox.Model.Models.Order;

namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 物流查询服务接口
/// </summary>
public interface ILogisticsService
{
    /// <summary>
    /// 查询物流信息
    /// </summary>
    /// <param name="trackingNo">快递单号</param>
    /// <param name="courierCode">快递公司编码</param>
    /// <returns>物流查询结果</returns>
    Task<LogisticsQueryResult> QueryLogisticsAsync(string trackingNo, string courierCode);
}

/// <summary>
/// 物流查询结果
/// </summary>
public class LogisticsQueryResult
{
    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 投递状态：0快递收件(揽件)，1在途中，2正在派件，3已签收，4派送失败，5疑难件，6退件签收，7其他
    /// </summary>
    public int DeliveryStatus { get; set; }

    /// <summary>
    /// 物流轨迹列表
    /// </summary>
    public List<LogisticsTraceDto>? TraceList { get; set; }

    /// <summary>
    /// 错误消息
    /// </summary>
    public string? ErrorMessage { get; set; }
}
