2023-09-08 10:22:58 +05:00
|
|
|
|
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>
|
|
|
|
|
{
|
2024-07-04 11:02:45 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение дерева директорий
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<ManualDirectoryDto>> GetTreeAsync(CancellationToken cancellationToken);
|
2023-09-08 10:22:58 +05:00
|
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
|
/// <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);
|
2023-09-08 10:22:58 +05:00
|
|
|
|
|
2024-07-04 11:02:45 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Проверка директории на существование
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<bool> IsExistsAsync(int id, CancellationToken cancellationToken);
|
2023-09-08 10:22:58 +05:00
|
|
|
|
}
|