From 3c3744c0ceba36fe9f5958af5f26788e6482553a Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 4 Nov 2026 10:07:03 +0100 Subject: [PATCH] Add CloseWorkflowReqBody and CloseWorkflowReqResponse Introduce two new classes in the DigitalData.TaskFlow.API.Models namespace to handle workflow closure requests and responses. - CloseWorkflowReqBody.cs: - Added CloseWorkflowReqBody class with properties: - ClosingMethodId: int, mapped to "closing_method_id". - Comment: nullable string. - RejectionReasonId: nullable byte, mapped to "rejection_reason_id". - CloseWorkflowReqResponse.cs: - Added CloseWorkflowReqResponse class with Meta property: - Meta: List of CloseWorkflowResult, initialized to an empty list. --- .../Models/CloseWorkflowReqBody.cs | 26 +++++++++++++++++++ .../Models/CloseWorkflowReqResponse.cs | 14 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqBody.cs create mode 100644 src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqResponse.cs diff --git a/src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqBody.cs b/src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqBody.cs new file mode 100644 index 0000000..243fb8b --- /dev/null +++ b/src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqBody.cs @@ -0,0 +1,26 @@ +using System.Text.Json.Serialization; + +namespace DigitalData.TaskFlow.API.Models; + +/// +/// +/// +public class CloseWorkflowReqBody +{ + /// + /// + /// + [JsonPropertyName("closing_method_id")] + public int ClosingMethodId { get; init; } + + /// + /// + /// + public string? Comment { get; init; } + + /// + /// + /// + [JsonPropertyName("rejection_reason_id")] + public byte? RejectionReasonId { get; init; } +} diff --git a/src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqResponse.cs b/src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqResponse.cs new file mode 100644 index 0000000..129c2b1 --- /dev/null +++ b/src/presentation/DigitalData.TaskFlow.API/Models/CloseWorkflowReqResponse.cs @@ -0,0 +1,14 @@ +using DigitalData.TaskFlow.Application.Features.Workflows.Commands; + +namespace DigitalData.TaskFlow.API.Models; + +/// +/// +/// +public class CloseWorkflowReqResponse +{ + /// + /// + /// + public List Meta { get; init; } = []; +}