From 37381af04274f60bdc35f8a68861f5c5cb881caf Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 16 Jan 2026 00:58:55 +0100 Subject: [PATCH] Add UpdateEndpointAuthProcedure for endpoint updates Introduce the `UpdateEndpointAuthProcedure` record in the `ReC.Application.Common.Procedures.UpdateProcedure` namespace. This class implements the `IUpdateProcedure` interface and includes properties for managing endpoint authentication details such as `Active`, `Description`, `TypeId`, `ApiKey`, `ApiValue`, `Token`, `Username`, `Password`, `Domain`, and `Workstation`. Add the `ToObjectProcedure` method to convert the procedure into an `UpdateObjectProcedure` instance, setting the entity to `ENDPOINT_AUTH` and allowing optional tracking of the user who made the changes. --- .../UpdateEndpointAuthProcedure.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/ReC.Application/Common/Procedures/UpdateProcedure/UpdateEndpointAuthProcedure.cs diff --git a/src/ReC.Application/Common/Procedures/UpdateProcedure/UpdateEndpointAuthProcedure.cs b/src/ReC.Application/Common/Procedures/UpdateProcedure/UpdateEndpointAuthProcedure.cs new file mode 100644 index 0000000..60ace97 --- /dev/null +++ b/src/ReC.Application/Common/Procedures/UpdateProcedure/UpdateEndpointAuthProcedure.cs @@ -0,0 +1,26 @@ +namespace ReC.Application.Common.Procedures.UpdateProcedure; + +public record UpdateEndpointAuthProcedure : IUpdateProcedure +{ + public bool? Active { get; set; } + public string? Description { get; set; } + public byte? TypeId { get; set; } + public string? ApiKey { get; set; } + public string? ApiValue { get; set; } + public bool? ApiKeyAddToId { get; set; } + public string? Token { get; set; } + public string? Username { get; set; } + public string? Password { get; set; } + public string? Domain { get; set; } + public string? Workstation { get; set; } + + public UpdateObjectProcedure ToObjectProcedure(long guid, string? changedWho = null) + { + return new UpdateObjectProcedure + { + Entity = "ENDPOINT_AUTH", + Guid = guid, + EndpointAuth = this + }.ChangedBy(changedWho); + } +}