DD.WellWorkover.Cloud/AsbCloudApp/Repositories/IManualDirectoryRepository.cs

37 lines
1.3 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AsbCloudApp.Data.Manuals;
using AsbCloudApp.Services;
namespace AsbCloudApp.Repositories;
/// <summary>
/// Репозиторий для работы с директориямиы хранящими инструкциями
/// </summary>
public interface IManualDirectoryRepository : ICrudRepository<ManualDirectoryDto>
{
/// <summary>
/// Получение дерева директорий
/// </summary>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<IEnumerable<ManualDirectoryDto>> GetTreeAsync(CancellationToken cancellationToken);
/// <summary>
/// Получение одной директории по параметрам
/// </summary>
/// <param name="name"></param>
/// <param name="idParent"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<ManualDirectoryDto?> GetOrDefaultAsync(string name, int? idParent, CancellationToken cancellationToken);
/// <summary>
/// Проверка директории на существование
/// </summary>
/// <param name="id"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<bool> IsExistsAsync(int id, CancellationToken cancellationToken);
}