forked from Eauldane/SnowcloakAPI
Initial mirror.
This commit is contained in:
14
MareSynchronosAPI/Dto/Files/DownloadFileDto.cs
Normal file
14
MareSynchronosAPI/Dto/Files/DownloadFileDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.Files;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record DownloadFileDto : ITransferFileDto
|
||||
{
|
||||
public bool FileExists { get; set; } = true;
|
||||
public string Hash { get; set; } = string.Empty;
|
||||
public string Url { get; set; } = string.Empty;
|
||||
public long Size { get; set; } = 0;
|
||||
public bool IsForbidden { get; set; } = false;
|
||||
public string ForbiddenBy { get; set; } = string.Empty;
|
||||
}
|
13
MareSynchronosAPI/Dto/Files/FilesSendDto.cs
Normal file
13
MareSynchronosAPI/Dto/Files/FilesSendDto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MareSynchronos.API.Dto.Files;
|
||||
|
||||
public class FilesSendDto
|
||||
{
|
||||
public List<string> FileHashes { get; set; } = new();
|
||||
public List<string> UIDs { get; set; } = new();
|
||||
}
|
8
MareSynchronosAPI/Dto/Files/ITransferFileDto.cs
Normal file
8
MareSynchronosAPI/Dto/Files/ITransferFileDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace MareSynchronos.API.Dto.Files;
|
||||
|
||||
public interface ITransferFileDto
|
||||
{
|
||||
string Hash { get; set; }
|
||||
bool IsForbidden { get; set; }
|
||||
string ForbiddenBy { get; set; }
|
||||
}
|
11
MareSynchronosAPI/Dto/Files/UploadFileDto.cs
Normal file
11
MareSynchronosAPI/Dto/Files/UploadFileDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using MessagePack;
|
||||
|
||||
namespace MareSynchronos.API.Dto.Files;
|
||||
|
||||
[MessagePackObject(keyAsPropertyName: true)]
|
||||
public record UploadFileDto : ITransferFileDto
|
||||
{
|
||||
public string Hash { get; set; } = string.Empty;
|
||||
public bool IsForbidden { get; set; } = false;
|
||||
public string ForbiddenBy { get; set; } = string.Empty;
|
||||
}
|
Reference in New Issue
Block a user