Complete Phase 2: Domain Layer implementation

Updated ROADMAP.md to mark Phase 2 as completed and added detailed descriptions of completed tasks. Introduced three new value objects (`Base64String`, `TenantId`, and `PdfMetadata`) in the `DocumentOperator.Domain.Models.ValueObjects` namespace. These classes ensure type safety, immutability, and encapsulated validation.

- `Base64String`: Handles Base64 string creation, validation, and conversion.
- `TenantId`: Represents a tenant identifier with validation and normalization.
- `PdfMetadata`: Represents PDF metadata with computed properties.

Updated `DocumentOperator.Domain.csproj` to reflect the addition of these value objects. The project is now ready to begin Phase 3 (Infrastructure Layer).
This commit is contained in:
OlgunR
2026-06-18 14:32:06 +02:00
parent cdb942210c
commit 3a87ace144
5 changed files with 166 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
namespace DocumentOperator.Domain.Models.ValueObjects;
public sealed class PdfMetadata
{
public int PageCount { get; }
public long FileSizeBytes { get; }
public string PdfVersion { get; }
public bool HasAttachments { get; }
public int AttachmentCount { get; }
// Computed Property (berechnet aus FileSizeBytes)
public double FileSizeMB => FileSizeBytes / 1024.0 / 1024.0;
public PdfMetadata(
int pageCount,
long fileSizeBytes,
string pdfVersion,
bool hasAttachments,
int attachmentCount)
{
PageCount = pageCount;
FileSizeBytes = fileSizeBytes;
PdfVersion = pdfVersion;
HasAttachments = hasAttachments;
AttachmentCount = attachmentCount;
}
public override string ToString()
{
return $"PDF: {PageCount} pages, {FileSizeMB:F2} MB, Version {PdfVersion}, Attachments: {AttachmentCount}";
}
}