diff --git a/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowDecision.cs b/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowDecision.cs
deleted file mode 100644
index 3cbcf50..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowDecision.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Closing;
-
-///
-/// Represents the user decision payload for closing a workflow process.
-///
-public sealed record CloseWorkflowDecision
-{
- ///
- /// Gets the selected closing method identifier.
- ///
- public required int ClosingMethodId { get; init; }
-
- ///
- /// Gets the optional comment attached to the decision.
- ///
- public string? Comment { get; init; }
-
- ///
- /// Gets the optional rejection reason identifier.
- ///
- public int? RejectionReasonId { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowOutcome.cs b/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowOutcome.cs
deleted file mode 100644
index ce0eb70..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowOutcome.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Closing;
-
-///
-/// Defines business outcomes of a close workflow attempt.
-///
-public enum CloseWorkflowOutcome
-{
- ///
- /// Workflow can be closed successfully.
- ///
- Closed = 0,
-
- ///
- /// Caller has no access to the requested workflow.
- ///
- NoAccess = 1,
-
- ///
- /// Workflow process was not found.
- ///
- NotFound = 2,
-
- ///
- /// Workflow is already closed and cannot be closed again.
- ///
- AlreadyClosed = 3,
-
- ///
- /// Closing cannot be completed yet because write integration is not finalized.
- ///
- NotImplemented = 4
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowResult.cs b/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowResult.cs
deleted file mode 100644
index 47cd5f5..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Closing/CloseWorkflowResult.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Closing;
-
-///
-/// Represents the result of a workflow closing operation.
-///
-public sealed record CloseWorkflowResult
-{
- ///
- /// Gets the process identifier.
- ///
- public required int ProcessId { get; init; }
-
- ///
- /// Gets a value indicating whether the process was closed successfully.
- ///
- public required bool IsClosed { get; init; }
-
- ///
- /// Gets the business outcome of the close request.
- ///
- public CloseWorkflowOutcome Outcome { get; init; } = CloseWorkflowOutcome.Closed;
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Common/ApiEnvelope.cs b/src/core/DigitalData.TaskFlow.Domain/Common/ApiEnvelope.cs
deleted file mode 100644
index b96ab0e..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Common/ApiEnvelope.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Common;
-
-///
-/// Represents the standard API envelope that contains meta information and payload data.
-///
-/// Type of the payload in the response.
-public sealed record ApiEnvelope
-{
- ///
- /// Gets the list of metadata entries describing the business result.
- ///
- public required IReadOnlyList Meta { get; init; }
-
- ///
- /// Gets the payload data returned by the endpoint.
- ///
- public T? Data { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Common/MetaEntry.cs b/src/core/DigitalData.TaskFlow.Domain/Common/MetaEntry.cs
deleted file mode 100644
index 6d99b83..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Common/MetaEntry.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Common;
-
-///
-/// Represents a single metadata item describing the business result state of an API response.
-///
-public sealed record MetaEntry
-{
- ///
- /// Gets the domain-specific result code.
- ///
- public required int Code { get; init; }
-
- ///
- /// Gets the human-readable message that belongs to .
- ///
- public required string Message { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Documents/DocumentBinaryResult.cs b/src/core/DigitalData.TaskFlow.Domain/Documents/DocumentBinaryResult.cs
deleted file mode 100644
index 2f072fa..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Documents/DocumentBinaryResult.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Documents;
-
-///
-/// Represents binary document content returned by the document endpoint.
-///
-public sealed record DocumentBinaryResult
-{
- ///
- /// Gets the raw binary content.
- ///
- public required byte[] Content { get; init; }
-
- ///
- /// Gets the MIME content type.
- ///
- public required string ContentType { get; init; }
-
- ///
- /// Gets the file name used for download.
- ///
- public required string FileName { get; init; }
-
- ///
- /// Gets the content length in bytes.
- ///
- public required long Length { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Entities/CustDocBase64.cs b/src/core/DigitalData.TaskFlow.Domain/Entities/CustDocBase64.cs
deleted file mode 100644
index 82f533d..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Entities/CustDocBase64.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace DigitalData.TaskFlow.Domain.Entities;
-
-[Table("TBCUST_DOC_BASE64", Schema = "dbo")]
-public sealed class CustDocBase64
-{
- [Column("ProcessID", TypeName = "bigint")]
- public long? ProcessId { get; set; }
-
- [Column("DocID", TypeName = "bigint")]
- public long? DocId { get; set; }
-
- [Column("Doctype", TypeName = "nvarchar(200)")]
- public string? DocType { get; set; }
-
- [Column("GroupType", TypeName = "nvarchar(200)")]
- public string? GroupType { get; set; }
-
- [Column("filename", TypeName = "nvarchar(500)")]
- public string? FileName { get; set; }
-
- [Column("filebase64", TypeName = "varchar(max)")]
- public string? FileBase64 { get; set; }
-
- [Column("ADDED_WHEN", TypeName = "datetime")]
- public DateTime AddedWhen { get; set; }
-
- [Column("thumbnailbase64", TypeName = "varchar(max)")]
- public string? ThumbnailBase64 { get; set; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Enums/MetaCode.cs b/src/core/DigitalData.TaskFlow.Domain/Enums/MetaCode.cs
deleted file mode 100644
index 168fc00..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Enums/MetaCode.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Enums;
-
-///
-/// Defines domain-level result codes used in API meta responses.
-///
-public enum MetaCode
-{
- ///
- /// Operation completed successfully.
- ///
- Ok = 0,
-
- ///
- /// Request is valid but no open workflows are available.
- ///
- NoOpenWorkflows = 1,
-
- ///
- /// Caller has no access to the requested resource.
- ///
- NoAccess = 2,
-
- ///
- /// Request is invalid or authentication failed according to endpoint rules.
- ///
- InvalidRequest = 4,
-
- ///
- /// Internal server error occurred.
- ///
- InternalError = 5,
-
- ///
- /// Requested resource was not found.
- ///
- NotFound = 6,
-
- ///
- /// Target workflow was already closed.
- ///
- AlreadyClosed = 7
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/Document.cs b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/Document.cs
new file mode 100644
index 0000000..9dccf7e
--- /dev/null
+++ b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/Document.cs
@@ -0,0 +1,5 @@
+namespace DigitalData.TaskFlow.Domain.ProcedureResults;
+
+public class Document : ProcedureResultBase
+{
+}
diff --git a/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/ProcedureResultBase.cs b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/ProcedureResultBase.cs
new file mode 100644
index 0000000..75ac5b6
--- /dev/null
+++ b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/ProcedureResultBase.cs
@@ -0,0 +1,8 @@
+namespace DigitalData.TaskFlow.Domain.ProcedureResults;
+
+public abstract class ProcedureResultBase
+{
+ public virtual int? Code { get; init; }
+
+ public virtual string? Result { get; init; }
+}
diff --git a/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/Workflow.cs b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/Workflow.cs
new file mode 100644
index 0000000..df8b34a
--- /dev/null
+++ b/src/core/DigitalData.TaskFlow.Domain/ProcedureResults/Workflow.cs
@@ -0,0 +1,5 @@
+namespace DigitalData.TaskFlow.Domain.ProcedureResults;
+
+public class Workflow : ProcedureResultBase
+{
+}
diff --git a/src/core/DigitalData.TaskFlow.Domain/README.md b/src/core/DigitalData.TaskFlow.Domain/README.md
deleted file mode 100644
index c7a151b..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# DigitalData.TaskFlow.Domain
-
-Dieses Projekt bildet den fachlichen Kern von `DigitalData.TaskFlow`.
-
-## Zweck
-
-Die Domain-Schicht enthaelt ausschließlich fachliche Modelle und Begriffe. Hier wird beschrieben, **was** das System fachlich darstellt, nicht **wie** Daten gelesen/geschrieben werden.
-
-## Aktueller Inhalt
-
-- `Common/`
- - `ApiEnvelope`: Standard-Response-Huelle mit `Meta` und `Data`.
- - `MetaEntry`: Einzelner Meta-Eintrag (`Code`, `Message`).
-- `Enums/`
- - `MetaCode`: Fachliche Status-Codes (z. B. `Ok`, `NoAccess`, `AlreadyClosed`).
-- `Workflows/`
- - Modelle fuer den Endpoint `GET /workflows/{wisagid}`.
- - Enthalten Quellblock-Struktur (`SourceBlock`, `FerdinandSourceBlock`, `ContractsSourceBlock`) und Untermodelle (`ProfileItem`, `WorkflowListingItem`, `ApprovalItem`, `DocumentReferenceItem`, `ClosingMethodItem`, `RejectionReasonItem`).
-- `Closing/`
- - Modelle fuer den Endpoint `POST /workflows/{wisagid}/{source}/{processid}/closing`.
- - `CloseWorkflowDecision` (Eingabe), `CloseWorkflowResult` (Ergebnis).
-- `Documents/`
- - `DocumentBinaryResult` fuer den Endpoint `GET /documents/{id}`.
-
-## Architektur-Regeln
-
-- Keine EF-Core-, HTTP-, SQL- oder Infrastruktur-Abhaengigkeiten.
-- Keine Controller- oder Middleware-Logik.
-- Modelle bleiben in PascalCase; technische DB-Namensabweichungen werden spaeter in Infrastructure gemappt.
-
-## Warum diese Schicht wichtig ist
-
-Die Domain stellt eine stabile, technologieunabhaengige Sprache bereit. Dadurch koennen API, Application und Infrastructure getrennt entwickelt werden, ohne den fachlichen Vertrag zu verlieren.
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/ApprovalItem.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/ApprovalItem.cs
deleted file mode 100644
index 177368f..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/ApprovalItem.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents a completed approval action for a workflow process.
-///
-public sealed record ApprovalItem
-{
- ///
- /// Gets the process identifier.
- ///
- public required int ProcessId { get; init; }
-
- ///
- /// Gets the approval sequence index.
- ///
- public required int Sequence { get; init; }
-
- ///
- /// Gets the user name or identifier of the approver.
- ///
- public required string ApprovedBy { get; init; }
-
- ///
- /// Gets the UTC timestamp when approval was recorded.
- ///
- public required DateTime ApprovedAtUtc { get; init; }
-
- ///
- /// Gets the optional approval comment.
- ///
- public string? Comment { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/ClosingMethodItem.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/ClosingMethodItem.cs
deleted file mode 100644
index 223f734..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/ClosingMethodItem.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents a workflow closing option available for user decision.
-///
-public sealed record ClosingMethodItem
-{
- ///
- /// Gets the closing method identifier.
- ///
- public required int ClosingMethodId { get; init; }
-
- ///
- /// Gets the display name of the method.
- ///
- public required string Name { get; init; }
-
- ///
- /// Gets a value indicating whether a comment is mandatory for this method.
- ///
- public required bool CommentRequired { get; init; }
-
- ///
- /// Gets a value indicating whether this method represents a rejection.
- ///
- public required bool IsRejection { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/ContractsSourceBlock.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/ContractsSourceBlock.cs
deleted file mode 100644
index 5c1759a..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/ContractsSourceBlock.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-using System.Text.Json;
-using System.Text.Json.Serialization;
-
-///
-/// Represents workflow data for the Contracts source system.
-///
-public sealed record ContractsSourceBlock : SourceBlock
-{
- ///
- /// Gets available approval profiles.
- ///
- [JsonPropertyName("profile")]
- public required IReadOnlyList Profile { get; init; }
-
- ///
- /// Gets workflow listing items.
- ///
- [JsonPropertyName("Listing")]
- public required IReadOnlyList Listing { get; init; }
-
- ///
- /// Gets already executed approvals.
- ///
- [JsonPropertyName("approvals")]
- public required IReadOnlyList Approvals { get; init; }
-
- ///
- /// Gets document references for workflows.
- ///
- [JsonPropertyName("document")]
- public required IReadOnlyList Document { get; init; }
-
- ///
- /// Gets available closing methods for workflows.
- ///
- [JsonPropertyName("closing_method")]
- public required IReadOnlyList ClosingMethod { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/DocumentReferenceItem.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/DocumentReferenceItem.cs
deleted file mode 100644
index c90f399..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/DocumentReferenceItem.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents a lightweight document reference linked to a workflow process.
-///
-public sealed record DocumentReferenceItem
-{
- ///
- /// Gets the document identifier used for binary retrieval.
- ///
- public required string Id { get; init; }
-
- ///
- /// Gets the process identifier.
- ///
- public required int ProcessId { get; init; }
-
- ///
- /// Gets the document title.
- ///
- public required string Title { get; init; }
-
- ///
- /// Gets the document subtitle.
- ///
- public required string Subtitle { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/FerdinandSourceBlock.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/FerdinandSourceBlock.cs
deleted file mode 100644
index 4d481a9..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/FerdinandSourceBlock.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-using System.Text.Json;
-using System.Text.Json.Serialization;
-
-///
-/// Represents workflow data for the Ferdinand source system.
-///
-public sealed record FerdinandSourceBlock : SourceBlock
-{
- ///
- /// Gets available approval profiles.
- ///
- [JsonPropertyName("profile")]
- public required IReadOnlyList Profile { get; init; }
-
- ///
- /// Gets workflow listing items.
- ///
- [JsonPropertyName("Listing")]
- public required IReadOnlyList Listing { get; init; }
-
- ///
- /// Gets already executed approvals.
- ///
- [JsonPropertyName("approvals")]
- public required IReadOnlyList Approvals { get; init; }
-
- ///
- /// Gets document references for workflows.
- ///
- [JsonPropertyName("document")]
- public required IReadOnlyList Document { get; init; }
-
- ///
- /// Gets available closing methods for workflows.
- ///
- [JsonPropertyName("closing_method")]
- public required IReadOnlyList ClosingMethod { get; init; }
-
- ///
- /// Gets available rejection reasons for rejection-type methods.
- ///
- [JsonPropertyName("rejection_reason")]
- public required IReadOnlyList RejectionReason { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/ProfileItem.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/ProfileItem.cs
deleted file mode 100644
index a71a46d..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/ProfileItem.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents an approval profile for workflow processing.
-///
-public sealed record ProfileItem
-{
- ///
- /// Gets the profile identifier.
- ///
- public required int ProfileId { get; init; }
-
- ///
- /// Gets the display title of the profile.
- ///
- public required string Title { get; init; }
-
- ///
- /// Gets the optional priority value.
- ///
- public int? Priority { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/RejectionReasonItem.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/RejectionReasonItem.cs
deleted file mode 100644
index fddaccb..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/RejectionReasonItem.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents a rejection reason that can be selected for rejection methods.
-///
-public sealed record RejectionReasonItem
-{
- ///
- /// Gets the rejection reason identifier.
- ///
- public required int RejectionReasonId { get; init; }
-
- ///
- /// Gets the display name of the rejection reason.
- ///
- public required string Name { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/SourceBlock.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/SourceBlock.cs
deleted file mode 100644
index 8808ae2..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/SourceBlock.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Base type for source-specific workflow blocks.
-///
-public abstract record SourceBlock
-{
- ///
- /// Gets the source system name.
- ///
- public required string Source { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/WorkflowListingItem.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/WorkflowListingItem.cs
deleted file mode 100644
index 77feff1..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/WorkflowListingItem.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents a single workflow listing row.
-///
-public sealed record WorkflowListingItem
-{
- ///
- /// Gets the process identifier.
- ///
- public required int ProcessId { get; init; }
-
- ///
- /// Gets the profile identifier associated with the process.
- ///
- public required int ProfileId { get; init; }
-
- ///
- /// Gets the voucher type.
- ///
- public required string VoucherType { get; init; }
-
- ///
- /// Gets the voucher number.
- ///
- public required string VoucherNumber { get; init; }
-
- ///
- /// Gets the voucher date.
- ///
- public required DateOnly VoucherDate { get; init; }
-
- ///
- /// Gets the cost center number.
- ///
- public required string CostCenter { get; init; }
-
- ///
- /// Gets the cost center description.
- ///
- public required string CostCenterDescription { get; init; }
-
- ///
- /// Gets the client number.
- ///
- public required int ClientNumber { get; init; }
-
- ///
- /// Gets the client name.
- ///
- public required string ClientName { get; init; }
-
- ///
- /// Gets the supplier number.
- ///
- public required string SupplierNumber { get; init; }
-
- ///
- /// Gets the supplier name.
- ///
- public required string SupplierName { get; init; }
-
- ///
- /// Gets the net amount.
- ///
- public required decimal NetAmount { get; init; }
-
- ///
- /// Gets the gross amount.
- ///
- public required decimal GrossAmount { get; init; }
-
- ///
- /// Gets the discount amount.
- ///
- public required decimal DiscountAmount { get; init; }
-
- ///
- /// Gets the currency.
- ///
- public required string Currency { get; init; }
-
- ///
- /// Gets the priority value.
- ///
- public required int Priority { get; init; }
-}
diff --git a/src/core/DigitalData.TaskFlow.Domain/Workflows/WorkflowSourcesResponse.cs b/src/core/DigitalData.TaskFlow.Domain/Workflows/WorkflowSourcesResponse.cs
deleted file mode 100644
index ff36086..0000000
--- a/src/core/DigitalData.TaskFlow.Domain/Workflows/WorkflowSourcesResponse.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace DigitalData.TaskFlow.Domain.Workflows;
-
-///
-/// Represents the workflow payload grouped by source systems.
-///
-public sealed record WorkflowSourcesResponse
-{
- ///
- /// Gets the source blocks included in the response.
- ///
- public required IReadOnlyList Sources { get; init; }
-}