2022-10-11 09:38:19 +05:00
|
|
|
|
using AsbCloudApp.Requests;
|
|
|
|
|
using AsbCloudApp.Data;
|
2022-10-06 14:37:03 +05:00
|
|
|
|
using AsbCloudApp.Services;
|
2022-09-28 10:46:12 +05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2022-10-06 14:37:03 +05:00
|
|
|
|
namespace AsbCloudApp.Repositories
|
2022-09-28 10:46:12 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сервис доступа к файлам
|
|
|
|
|
/// </summary>
|
2022-12-01 15:56:11 +05:00
|
|
|
|
public interface IFileRepository : ICrudRepository<FileInfoDto>
|
2022-09-28 10:46:12 +05:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-10-17 14:42:47 +05:00
|
|
|
|
/// Получение файлов по скважине
|
2022-09-28 10:46:12 +05:00
|
|
|
|
/// </summary>
|
2022-10-17 14:42:47 +05:00
|
|
|
|
/// <param name="request"></param>
|
2022-09-28 10:46:12 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-10-17 14:42:47 +05:00
|
|
|
|
Task<IEnumerable<FileInfoDto>> GetInfosAsync(FileRequest request, CancellationToken token);
|
2022-09-28 10:46:12 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить список файлов в контейнере
|
|
|
|
|
/// </summary>
|
2022-10-11 08:28:37 +05:00
|
|
|
|
/// <param name="request"></param>
|
2022-09-28 10:46:12 +05:00
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-10-17 14:42:47 +05:00
|
|
|
|
Task<PaginationContainer<FileInfoDto>> GetInfosPaginatedAsync(FileRequest request, CancellationToken token = default);
|
2022-09-28 10:46:12 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Пометить файл как удаленный
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idFile"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> MarkAsDeletedAsync(int idFile, CancellationToken token = default);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// удалить файлы
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ids"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<FileInfoDto>> DeleteAsync(IEnumerable<int> ids, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// получить инфо о файле по метке
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idMark"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// добавить метку на файл
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileMarkDto"></param>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> CreateFileMarkAsync(FileMarkDto fileMarkDto, int idUser, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Инфо о файлах
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idsFile"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<IEnumerable<FileInfoDto>> GetInfoByIdsAsync(IEnumerable<int> idsFile, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// пометить метки файлов как удаленные
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idsMarks"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<int> MarkFileMarkAsDeletedAsync(IEnumerable<int> idsMarks, CancellationToken token);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|