forked from ddrilling/AsbCloudServer
42 lines
2.1 KiB
C#
42 lines
2.1 KiB
C#
using AsbCloudApp.Data;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudApp.Services
|
|
{
|
|
public interface IFileService
|
|
{
|
|
string RootPath { get; }
|
|
|
|
Task<string> GetSharedUrlAsync(int idFileInfo, int idUser, IFileShareService fileShareService, CancellationToken token);
|
|
Task<string> GetSharedUrlAsync(FileInfoDto dto, int idUser, IFileShareService fileShareService,
|
|
CancellationToken token = default);
|
|
|
|
Task<FileInfoDto> SaveAsync(int idWell, int? idUser, int idCategory, string fileFullName, Stream fileStream, CancellationToken token = default);
|
|
|
|
Task<PaginationContainer<FileInfoDto>> GetInfosAsync(int idWell,
|
|
int idCategory, string companyName = default, string fileName = default, DateTime begin = default, DateTime end = default,
|
|
int skip = 0, int take = 32, CancellationToken token = default);
|
|
|
|
Task<FileInfoDto> GetInfoAsync(int idFile,
|
|
CancellationToken token);
|
|
|
|
Task<int> MarkAsDeletedAsync(int idFile,
|
|
CancellationToken token = default);
|
|
Task<IEnumerable<FileInfoDto>> GetInfosByCategoryAsync(int idWell, int idCategory, CancellationToken token = default);
|
|
Task<int> DeleteAsync(int id, CancellationToken token);
|
|
Task<int> DeleteAsync(IEnumerable<int> ids, CancellationToken token);
|
|
string GetUrl(FileInfoDto fileInfo);
|
|
string GetUrl(int idFile);
|
|
string GetUrl(int idWell, int idCategory, int idFile, string dotExtention);
|
|
Task<int> CreateFileMarkAsync(FileMarkDto fileMarkDto, int idUser, CancellationToken token);
|
|
Task<int> MarkFileMarkAsDeletedAsync(int idMark, CancellationToken token);
|
|
Task<FileInfoDto> MoveAsync(int idWell, int? idUser, int idCategory, string destinationFileName, string srcFileFullName, CancellationToken token = default);
|
|
Task<FileInfoDto> GetByMarkId(int idMark, CancellationToken token);
|
|
Task<int> MarkFileMarkAsDeletedAsync(IEnumerable<int> idsMarks, CancellationToken token);
|
|
}
|
|
}
|