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
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user