forked from ddrilling/AsbCloudServer
33 lines
1.4 KiB
C#
33 lines
1.4 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<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 fileId,
|
|
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);
|
|
string GetUrl(FileInfoDto fileInfo);
|
|
string GetUrl(int idFile);
|
|
string GetUrl(int idWell, int idCategory, int idFile, string dotExtention);
|
|
Task<FileInfoDto> MoveAsync(int idWell, int? idUser, int idCategory, string destinationFileName, string srcFileFullName, CancellationToken token = default);
|
|
}
|
|
}
|