From 4af488cf6a50eb6db1820667c7348e3ceb7f99db Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Mon, 27 May 2024 10:11:10 +0200 Subject: [PATCH] Remove unnecessary properties from WorkflowDefinition models This commit removes a number of unnecessary properties from the `WorkflowDefinitionModel` and `WorkflowDefinitionSummary` classes. These changes help simplify the models and focus on the core properties required for workflow definitions. Specific properties removed include `Id`, `CreatedAt`, `Version`, and status flags such as `IsLatest` and `IsPublished`. --- .../Models/WorkflowDefinitionModel.cs | 25 ------------------- .../Models/WorkflowDefinitionSummary.cs | 11 +++----- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionModel.cs b/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionModel.cs index b0b840d37..a617b54f3 100644 --- a/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionModel.cs +++ b/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionModel.cs @@ -10,11 +10,6 @@ namespace Elsa.Api.Client.Resources.WorkflowDefinitions.Models; [PublicAPI] public class WorkflowDefinitionModel : LinkedEntity { - /// - /// Gets or sets the version ID of the workflow definition. - /// - public string Id { get; set; } = default!; - /// /// Gets or sets the definition ID of the workflow definition. /// @@ -30,16 +25,6 @@ public class WorkflowDefinitionModel : LinkedEntity /// public string? Description { get; set; } - /// - /// Gets or sets the time at which the workflow definition was created. - /// - public DateTimeOffset CreatedAt { get; set; } - - /// - /// Gets or sets the version of the workflow definition. - /// - public int Version { get; set; } - /// /// Gets or sets the version of the tool that created the workflow definition. /// @@ -75,16 +60,6 @@ public class WorkflowDefinitionModel : LinkedEntity /// public bool IsReadonly { get; set; } - /// - /// Gets or sets whether this is the latest version of the workflow definition. - /// - public bool IsLatest { get; set; } - - /// - /// Gets or sets whether this is the published version of the workflow definition. - /// - public bool IsPublished { get; set; } - /// /// Gets or sets the of the workflow definition. /// diff --git a/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionSummary.cs b/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionSummary.cs index 54bc6ecde..fe1a4cc55 100644 --- a/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionSummary.cs +++ b/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Models/WorkflowDefinitionSummary.cs @@ -9,13 +9,8 @@ namespace Elsa.Api.Client.Resources.WorkflowDefinitions.Models; [PublicAPI] public class WorkflowDefinitionSummary : LinkedEntity { - public string Id { get; set; } - public string DefinitionId { get; set; } - public string Name { get; set; } + public string DefinitionId { get; set; } = default!; + public string Name { get; set; } = default!; public string? Description { get; set; } - public int Version { get; set; } - public bool IsLatest { get; set; } - public bool IsPublished { get; set; } - public string MaterializerName { get; set; } - public DateTimeOffset CreatedAt { get; set; } + public string MaterializerName { get; set; } = default!; } \ No newline at end of file