Refactor domain model and exception handling

Significantly restructured the `DigitalData.MessagingService.Domain` project by removing unused domain-specific classes, enums, and value objects. Key changes include:

- Updated `ExceptionHandlingMiddleware` to handle `FluentValidation.ValidationException` with formatted validation errors mapped to `HttpStatusCode.BadRequest`.
- Removed foundational domain classes such as `BaseEntity`, `ValueObject`, and `IAggregateRoot`.
- Deleted enums (`AttachmentStatus`, `AuthenticationType`, `EmailStatus`, `ErrorCode`, `ProcessType`) and domain exceptions (`DomainException`, `AttachmentProcessingException`, `DmsNotAvailableException`, `InvalidPdfException`, `ValidationException`).
- Removed value objects (`EmailAddress`, `MessageId`) and the `MessageIdGenerator` service.
- Cleaned up the project structure by removing the `Events` folder reference.

These changes simplify the domain model, reduce unused code, and align the project with updated architectural goals.
This commit is contained in:
2026-07-27 15:37:34 +02:00
parent 2d7af80cd3
commit 77e7c796fa
19 changed files with 1 additions and 348 deletions

View File

@@ -10,8 +10,4 @@
<PackageReference Include="MediatR" Version="12.2.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Events\" />
</ItemGroup>
</Project>