From 5166f41941743feeb8c6faf15c9c99b3ef08bfb8 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Mon, 5 May 2025 02:06:33 +0200 Subject: [PATCH] Refactor CreateEnvelopeResponse to use record type Changed CreateEnvelopeResponse from a class to a record type for improved immutability and conciseness. The new definition inherits from ReadEnvelopeResponse, reusing its functionality. Added XML documentation comments for better clarity on each parameter. --- .../Commands/CreateEnvelopeResponse.cs | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeResponse.cs b/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeResponse.cs index 805de24d..998b80e0 100644 --- a/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeResponse.cs +++ b/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeResponse.cs @@ -1,8 +1,20 @@ -namespace EnvelopeGenerator.Application.Envelopes.Commands; +using EnvelopeGenerator.Application.Envelopes.Queries.Read; + +namespace EnvelopeGenerator.Application.Envelopes.Commands; /// /// /// -public class CreateEnvelopeResponse -{ -} +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +public record CreateEnvelopeResponse(int Id, int UserId, int Status, string Uuid, string? Message, DateTime AddedWhen, DateTime? ChangedWhen, string? Title, string Language, bool TFAEnabled, DigitalData.UserManager.Domain.Entities.User User) + : ReadEnvelopeResponse(Id, UserId, Status, Uuid, Message, AddedWhen, ChangedWhen, Title, Language, TFAEnabled, User);