shoc-backend/SeaHaven.Services/DTOs/VendorDocumentDTOs.cs
2026-08-11 08:58:19 -03:00

47 lines
1.7 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";
// SH-101: echoes the validated document purpose.
public string Purpose { get; set; } = "Completion";
}
public sealed class VendorDocumentStatusDTO
{
public int Id { get; set; }
public string OriginalFileName { get; set; } = string.Empty;
public string ScanStatus { get; set; } = "Pending";
public string ReviewStatus { get; set; } = "Processing";
public string Purpose { get; set; } = "Completion";
}
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 };
}
}