using System.Collections.Generic;
using System.Threading.Tasks;
using MDL.Models;

namespace DAL.Interfaces
{
    /// <summary>
    /// 订单日志仓储接口
    /// </summary>
    public interface IOrderLogRepository
    {
        /// <summary>
        /// 插入订单日志
        /// </summary>
        /// <param name="log">订单日志实体</param>
        /// <returns>插入是否成功</returns>
        Task<bool> InsertOrderLogAsync(OrderLogEntity log);
        
        /// <summary>
        /// 根据中性面单单号获取订单日志列表
        /// </summary>
        /// <param name="neutralWaybillNumber">中性面单单号</param>
        /// <returns>订单日志实体列表</returns>
        Task<List<OrderLogEntity>> GetOrderLogsByWaybillNumberAsync(string neutralWaybillNumber);
        
        /// <summary>
        /// 根据尾程跟踪单号获取订单日志列表
        /// </summary>
        /// <param name="finalMileTrackingNumber">尾程跟踪单号</param>
        /// <returns>订单日志实体列表</returns>
        Task<List<OrderLogEntity>> GetOrderLogsByTrackingNumberAsync(string finalMileTrackingNumber);
        
        /// <summary>
        /// 获取所有订单日志列表（分页）
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页大小</param>
        /// <returns>订单日志实体列表</returns>
        Task<List<OrderLogEntity>> GetAllOrderLogsAsync(int pageIndex, int pageSize);
        
        /// <summary>
        /// 根据操作类型和操作结果获取订单日志列表
        /// </summary>
        /// <param name="operationType">操作类型</param>
        /// <param name="operationResult">操作结果</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页大小</param>
        /// <returns>订单日志实体列表</returns>
        Task<List<OrderLogEntity>> GetOrderLogsByOperationAsync(string operationType, string operationResult, int pageIndex, int pageSize);
    }
}
