refactor: Move DTOs from Domain to Application layer
- Move PdfMetadata, PdfAMetadata from Domain.Models.ValueObjects to Application.Common.DTOs - Move AttachmentInfo, AttachmentMetadata from Domain.Models.ValueObjects to Application.Common.DTOs - Reason: DTOs belong in Application layer, Domain should have zero external dependencies (Clean Architecture)
This commit is contained in:
23
DocumentOperator.Application/Common/DTOs/PdfMetadata.cs
Normal file
23
DocumentOperator.Application/Common/DTOs/PdfMetadata.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace DocumentOperator.Application.Common.DTOs;
|
||||
|
||||
public sealed class PdfMetadata(
|
||||
int pageCount,
|
||||
long fileSizeBytes,
|
||||
string pdfVersion,
|
||||
bool hasAttachments,
|
||||
int attachmentCount)
|
||||
{
|
||||
public int PageCount { get; } = pageCount;
|
||||
public long FileSizeBytes { get; } = fileSizeBytes;
|
||||
public string PdfVersion { get; } = pdfVersion;
|
||||
public bool HasAttachments { get; } = hasAttachments;
|
||||
public int AttachmentCount { get; } = attachmentCount;
|
||||
|
||||
// Computed Property (berechnet aus FileSizeBytes)
|
||||
public double FileSizeMB => FileSizeBytes / 1024.0 / 1024.0;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"PDF: {PageCount} pages, {FileSizeMB:F2} MB, Version {PdfVersion}, Attachments: {AttachmentCount}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user