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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user