Refactor workflows and improve API responses

- Added `BackToPerMethodId` constant and updated validation rules in `CloseWorkflowCommandValidator`.
- Refactored `GetWorkflowsQueryHandler` for simpler `hasListingData` logic.
- Replaced strongly-typed properties with `JsonElement` in `ContractsSourceBlock` and `FerdinandSourceBlock`.
- Updated `WorkflowListingReadModel` to use smaller data types for efficiency.
- Refactored `WorkflowRepository` to use JSON-based data retrieval and parsing.
- Introduced `MetaOnlyResponse` and `WorkflowsResponse` for consistent API responses.
- Updated `DocumentsController` and `WorkflowsController` to use new response types.
- Added `ApiKeyAuthMiddleware` for API key validation and integrated it into the middleware pipeline.
- Refactored `ExceptionHandlingMiddleware` to use `MetaOnlyResponse` for error handling.
- Performed general cleanup and modernization for improved readability and maintainability.
This commit is contained in:
2026-10-10 20:47:31 +02:00
parent 600374a6f0
commit 70e82567d8
14 changed files with 352 additions and 166 deletions

View File

@@ -17,7 +17,7 @@ public sealed class WorkflowListingReadModel
/// Gets or sets the profile identifier.
/// </summary>
[Column("profileid")]
public int ProfileId { get; set; }
public byte ProfileId { get; set; }
/// <summary>
/// Gets or sets the voucher type.
@@ -53,7 +53,7 @@ public sealed class WorkflowListingReadModel
/// Gets or sets the client number.
/// </summary>
[Column("mandantnr")]
public int ClientNumber { get; set; }
public short ClientNumber { get; set; }
/// <summary>
/// Gets or sets the client name.
@@ -101,7 +101,7 @@ public sealed class WorkflowListingReadModel
/// Gets or sets the priority.
/// </summary>
[Column("priority")]
public int Priority { get; set; }
public byte Priority { get; set; }
/// <summary>
/// Gets or sets the source group text.