using PARR.Domain.Cache.Models;
using PARR.Domain.DTOs.Matching;
using PARR.Domain.Enums;

namespace PARR.Core.Services.MatchingStatusService
{
    /// <summary>
    /// Сервис по управлению статусом Matching`a
    /// </summary>
    public interface IMatchingStatusService
    {
        /// <summary>
        /// Получить статус matching`a
        /// </summary>
        /// <param name="objectId"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Task<MatchingStatus> GetStatusAsync(Guid objectId, SyncTaskEntityTypeEnum type);

        /// <summary>
        /// Установить/обновить статус matching`a
        /// </summary>
        /// <param name="objectId"></param>
        /// <param name="type"></param>
        /// <param name="data"></param>
        /// <param name="cacheDuration"></param>
        /// <returns></returns>
        Task SetMatchingStatusAsync(Guid objectId, SyncTaskEntityTypeEnum type, MatchingStatusItem data, TimeSpan cacheDuration);

        /// <summary>
        /// Удалить статус matching`a
        /// </summary>
        /// <param name="objectId"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Task DeleteMatchingStatusAsync(Guid objectId, SyncTaskEntityTypeEnum type);
    }
}
