shoc-backend/SeaHaven.Services/DTOs/VendorDocumentDTOs.cs
2026-07-24 16:36:48 -03:00

36 lines
1.2 KiB
C#

namespace SeaHaven.Services.DTOs
{
public sealed class UploadCompletionDocumentResultDTO
{
public int Id { get; set; }
public int Version { get; set; }
public string ScanStatus { get; set; } = "Pending";
public string ReviewStatus { get; set; } = "Processing";
}
public enum VendorDocumentDownloadOutcome
{
Ok,
Locked,
NotFound
}
public sealed class DownloadCompletionDocumentResultDTO
{
public VendorDocumentDownloadOutcome Outcome { get; set; }
public Stream? Content { get; set; }
public string? ContentType { get; set; }
public string? FileName { get; set; }
public static DownloadCompletionDocumentResultDTO Ok(Stream content, string contentType, string fileName) => new()
{
Outcome = VendorDocumentDownloadOutcome.Ok,
Content = content,
ContentType = contentType,
FileName = fileName
};
public static DownloadCompletionDocumentResultDTO Locked() => new() { Outcome = VendorDocumentDownloadOutcome.Locked };
public static DownloadCompletionDocumentResultDTO NotFound() => new() { Outcome = VendorDocumentDownloadOutcome.NotFound };
}
}