Files
DocumentService/DocumentOperator.Application/Common/DTOs/AttachmentCheckResult.cs
TekH 364b755f95 feat: Add CheckPdfAttachments feature - Application layer
- Add CheckPdfAttachmentsQuery with dual input support (byte[] + Base64)
- Add CheckPdfAttachmentsQueryHandler with IPdfProcessor integration
- Add CheckPdfAttachmentsQueryValidator with FluentValidation rules
- Add AttachmentCheckResult DTO for API response
- Handler converts byte[] → MemoryStream for IPdfProcessor.CheckAttachmentsAsync()
- AutoMapper maps AttachmentInfo → AttachmentCheckResult
2026-07-20 11:56:03 +02:00

44 lines
1.1 KiB
C#

namespace DocumentOperator.Application.Common.DTOs;
/// <summary>
/// DTO for attachment check result returned to API layer
/// </summary>
public record AttachmentCheckResult
{
/// <summary>
/// Indicates whether the PDF contains any attachments
/// </summary>
public bool HasAttachments { get; init; }
/// <summary>
/// Total number of attachments in the PDF
/// </summary>
public int AttachmentCount { get; init; }
/// <summary>
/// List of attachment metadata (file details)
/// </summary>
public List<AttachmentDto> Attachments { get; init; } = new();
}
/// <summary>
/// DTO for individual attachment metadata
/// </summary>
public record AttachmentDto
{
/// <summary>
/// Attachment file name (e.g., "invoice.xml", "document.pdf")
/// </summary>
public string FileName { get; init; } = string.Empty;
/// <summary>
/// MIME type of the attachment (e.g., "text/xml", "application/pdf")
/// </summary>
public string MimeType { get; init; } = string.Empty;
/// <summary>
/// Attachment file size in bytes
/// </summary>
public long Size { get; init; }
}