2021-08-09 15:41:42 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using System;
|
2021-07-23 17:40:31 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-09-10 11:28:57 +05:00
|
|
|
|
using System.IO;
|
2021-08-11 16:54:42 +05:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
2021-07-23 17:40:31 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
|
|
|
|
public interface IFileService
|
|
|
|
|
{
|
|
|
|
|
string RootPath { get; }
|
|
|
|
|
|
2021-11-09 17:36:44 +05:00
|
|
|
|
Task<string> GetSharedUrlAsync(int idFileInfo, int idUser, CancellationToken token);
|
|
|
|
|
Task<string> GetSharedUrlAsync(FileInfoDto dto, int idUser,
|
2021-10-29 16:03:24 +05:00
|
|
|
|
CancellationToken token = default);
|
2021-10-29 12:47:18 +05:00
|
|
|
|
|
2021-09-01 15:55:10 +05:00
|
|
|
|
Task<FileInfoDto> SaveAsync(int idWell, int? idUser, int idCategory, string fileFullName, Stream fileStream, CancellationToken token = default);
|
2021-08-19 16:32:04 +05:00
|
|
|
|
|
2021-08-29 17:25:16 +05:00
|
|
|
|
Task<PaginationContainer<FileInfoDto>> GetInfosAsync(int idWell,
|
2021-08-31 18:01:26 +05:00
|
|
|
|
int idCategory, string companyName = default, string fileName = default, DateTime begin = default, DateTime end = default,
|
|
|
|
|
int skip = 0, int take = 32, CancellationToken token = default);
|
2021-07-23 17:40:31 +05:00
|
|
|
|
|
2021-11-09 17:36:44 +05:00
|
|
|
|
Task<FileInfoDto> GetInfoAsync(int idFile,
|
2021-08-11 17:26:02 +05:00
|
|
|
|
CancellationToken token);
|
2021-08-19 16:58:26 +05:00
|
|
|
|
|
2021-08-29 17:25:16 +05:00
|
|
|
|
Task<int> MarkAsDeletedAsync(int idFile,
|
2021-08-19 16:58:26 +05:00
|
|
|
|
CancellationToken token = default);
|
2021-08-29 17:25:16 +05:00
|
|
|
|
Task<IEnumerable<FileInfoDto>> GetInfosByCategoryAsync(int idWell, int idCategory, CancellationToken token = default);
|
2021-10-06 18:07:35 +05:00
|
|
|
|
Task<int> DeleteAsync(int id, CancellationToken token);
|
2021-09-23 10:52:10 +05:00
|
|
|
|
string GetUrl(FileInfoDto fileInfo);
|
|
|
|
|
string GetUrl(int idFile);
|
|
|
|
|
string GetUrl(int idWell, int idCategory, int idFile, string dotExtention);
|
2021-11-09 17:36:44 +05:00
|
|
|
|
Task<int> CreateFileMarkAsync(FileMarkDto fileMarkDto, int idUser, CancellationToken token);
|
|
|
|
|
Task<int> MarkFileMarkAsDeletedAsync(int idMark, CancellationToken token);
|
2021-09-23 11:55:25 +05:00
|
|
|
|
Task<FileInfoDto> MoveAsync(int idWell, int? idUser, int idCategory, string destinationFileName, string srcFileFullName, CancellationToken token = default);
|
2021-11-09 17:36:44 +05:00
|
|
|
|
Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token);
|
2021-07-23 17:40:31 +05:00
|
|
|
|
}
|
|
|
|
|
}
|