forked from ddrilling/AsbCloudServer
39 lines
1.8 KiB
C#
39 lines
1.8 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> GetFileWebUrlAsync(FileInfoDto dto, string userLogin,
|
|
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 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<int> CreateFileMarkAsync(int idWell, int idMarkType, int idProgramPartFile, string comment,
|
|
int fileChangerId, string fileChangerLogin, CancellationToken token);
|
|
Task<int> MarkFileMarkAsDeletedAsync(int idWell, int idMark, CancellationToken token);
|
|
Task<FileInfoDto> MoveAsync(int idWell, int? idUser, int idCategory, string destinationFileName, string srcFileFullName, CancellationToken token = default);
|
|
}
|
|
}
|