From 89db852705a1263ed7931d8366558b10defdf1bf Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 9 Feb 2026 15:55:20 +0100 Subject: [PATCH] Refactor auditing interfaces to new Auditing namespace Moved auditing interfaces to EnvelopeGenerator.Domain.Interfaces.Auditing. Updated entity classes to reference the new namespace. Added ICreationAuditable and IUpdateAuditable interfaces to improve code organization and clarify auditing responsibilities. --- EnvelopeGenerator.Domain/Entities/Document.cs | 2 ++ EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs | 2 +- EnvelopeGenerator.Domain/Entities/EmailTemplate.cs | 2 +- EnvelopeGenerator.Domain/Entities/Envelope.cs | 2 +- .../Entities/EnvelopeReceiverReadOnly.cs | 2 +- EnvelopeGenerator.Domain/Entities/Receiver.cs | 4 ++-- EnvelopeGenerator.Domain/Entities/Signature.cs | 1 + .../Interfaces/Auditing/ICreationAuditable.cs | 6 ++++++ .../Interfaces/{ => Auditing}/IHasAddedWhen.cs | 2 +- .../Interfaces/{ => Auditing}/IHasAddedWho.cs | 2 +- .../Interfaces/{ => Auditing}/IHasChangedWhen.cs | 2 +- .../Interfaces/{ => Auditing}/IHasChangedWho.cs | 2 +- .../Interfaces/Auditing/IUpdateAuditable.cs | 6 ++++++ 13 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 EnvelopeGenerator.Domain/Interfaces/Auditing/ICreationAuditable.cs rename EnvelopeGenerator.Domain/Interfaces/{ => Auditing}/IHasAddedWhen.cs (69%) rename EnvelopeGenerator.Domain/Interfaces/{ => Auditing}/IHasAddedWho.cs (60%) rename EnvelopeGenerator.Domain/Interfaces/{ => Auditing}/IHasChangedWhen.cs (70%) rename EnvelopeGenerator.Domain/Interfaces/{ => Auditing}/IHasChangedWho.cs (70%) create mode 100644 EnvelopeGenerator.Domain/Interfaces/Auditing/IUpdateAuditable.cs diff --git a/EnvelopeGenerator.Domain/Entities/Document.cs b/EnvelopeGenerator.Domain/Entities/Document.cs index 33c5472c..fa02a825 100644 --- a/EnvelopeGenerator.Domain/Entities/Document.cs +++ b/EnvelopeGenerator.Domain/Entities/Document.cs @@ -2,6 +2,8 @@ using EnvelopeGenerator.Domain.Interfaces; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; + +using EnvelopeGenerator.Domain.Interfaces.Auditing; #if NETFRAMEWORK using System.Drawing; using System.Collections.Generic; diff --git a/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs b/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs index bf9acefe..64a1e909 100644 --- a/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs +++ b/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs @@ -1,7 +1,7 @@ using System; -using EnvelopeGenerator.Domain.Interfaces; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using EnvelopeGenerator.Domain.Interfaces.Auditing; #if NETFRAMEWORK #endif diff --git a/EnvelopeGenerator.Domain/Entities/EmailTemplate.cs b/EnvelopeGenerator.Domain/Entities/EmailTemplate.cs index 0ec5414b..b0572418 100644 --- a/EnvelopeGenerator.Domain/Entities/EmailTemplate.cs +++ b/EnvelopeGenerator.Domain/Entities/EmailTemplate.cs @@ -1,9 +1,9 @@ using System; using DigitalData.Core.Abstractions.Interfaces; -using EnvelopeGenerator.Domain.Interfaces; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using EnvelopeGenerator.Domain.Interfaces.Auditing; namespace EnvelopeGenerator.Domain.Entities { diff --git a/EnvelopeGenerator.Domain/Entities/Envelope.cs b/EnvelopeGenerator.Domain/Entities/Envelope.cs index 80f31307..21e52a9d 100644 --- a/EnvelopeGenerator.Domain/Entities/Envelope.cs +++ b/EnvelopeGenerator.Domain/Entities/Envelope.cs @@ -1,10 +1,10 @@ using System; -using EnvelopeGenerator.Domain.Interfaces; using DigitalData.UserManager.Domain.Entities; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using EnvelopeGenerator.Domain.Constants; using Newtonsoft.Json; +using EnvelopeGenerator.Domain.Interfaces.Auditing; #if NETFRAMEWORK using System.Collections.Generic; using System.Linq; diff --git a/EnvelopeGenerator.Domain/Entities/EnvelopeReceiverReadOnly.cs b/EnvelopeGenerator.Domain/Entities/EnvelopeReceiverReadOnly.cs index 0beb5331..43e87bd3 100644 --- a/EnvelopeGenerator.Domain/Entities/EnvelopeReceiverReadOnly.cs +++ b/EnvelopeGenerator.Domain/Entities/EnvelopeReceiverReadOnly.cs @@ -1,8 +1,8 @@ using System; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; -using EnvelopeGenerator.Domain.Interfaces; using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes; +using EnvelopeGenerator.Domain.Interfaces.Auditing; namespace EnvelopeGenerator.Domain.Entities { diff --git a/EnvelopeGenerator.Domain/Entities/Receiver.cs b/EnvelopeGenerator.Domain/Entities/Receiver.cs index fc8f1e85..7620923e 100644 --- a/EnvelopeGenerator.Domain/Entities/Receiver.cs +++ b/EnvelopeGenerator.Domain/Entities/Receiver.cs @@ -1,6 +1,6 @@ -using EnvelopeGenerator.Domain.Interfaces; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using EnvelopeGenerator.Domain.Interfaces.Auditing; #if NETFRAMEWORK using System; using System.Collections.Generic; diff --git a/EnvelopeGenerator.Domain/Entities/Signature.cs b/EnvelopeGenerator.Domain/Entities/Signature.cs index e673c12a..42aad668 100644 --- a/EnvelopeGenerator.Domain/Entities/Signature.cs +++ b/EnvelopeGenerator.Domain/Entities/Signature.cs @@ -3,6 +3,7 @@ using EnvelopeGenerator.Domain.Interfaces; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using EnvelopeGenerator.Domain.Interfaces.Auditing; #if NETFRAMEWORK using System.Collections.Generic; #endif diff --git a/EnvelopeGenerator.Domain/Interfaces/Auditing/ICreationAuditable.cs b/EnvelopeGenerator.Domain/Interfaces/Auditing/ICreationAuditable.cs new file mode 100644 index 00000000..4ab790cf --- /dev/null +++ b/EnvelopeGenerator.Domain/Interfaces/Auditing/ICreationAuditable.cs @@ -0,0 +1,6 @@ +namespace EnvelopeGenerator.Domain.Interfaces.Auditing +{ + public interface ICreationAuditable : IHasAddedWhen, IHasAddedWho + { + } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Domain/Interfaces/IHasAddedWhen.cs b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasAddedWhen.cs similarity index 69% rename from EnvelopeGenerator.Domain/Interfaces/IHasAddedWhen.cs rename to EnvelopeGenerator.Domain/Interfaces/Auditing/IHasAddedWhen.cs index 8bd581f8..057e6a5e 100644 --- a/EnvelopeGenerator.Domain/Interfaces/IHasAddedWhen.cs +++ b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasAddedWhen.cs @@ -2,7 +2,7 @@ using System; #endif -namespace EnvelopeGenerator.Domain.Interfaces +namespace EnvelopeGenerator.Domain.Interfaces.Auditing { public interface IHasAddedWhen { diff --git a/EnvelopeGenerator.Domain/Interfaces/IHasAddedWho.cs b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasAddedWho.cs similarity index 60% rename from EnvelopeGenerator.Domain/Interfaces/IHasAddedWho.cs rename to EnvelopeGenerator.Domain/Interfaces/Auditing/IHasAddedWho.cs index 0ec5566b..edb5a206 100644 --- a/EnvelopeGenerator.Domain/Interfaces/IHasAddedWho.cs +++ b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasAddedWho.cs @@ -1,4 +1,4 @@ -namespace EnvelopeGenerator.Domain.Interfaces +namespace EnvelopeGenerator.Domain.Interfaces.Auditing { public interface IHasAddedWho { diff --git a/EnvelopeGenerator.Domain/Interfaces/IHasChangedWhen.cs b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasChangedWhen.cs similarity index 70% rename from EnvelopeGenerator.Domain/Interfaces/IHasChangedWhen.cs rename to EnvelopeGenerator.Domain/Interfaces/Auditing/IHasChangedWhen.cs index 6ba428a5..1a837f01 100644 --- a/EnvelopeGenerator.Domain/Interfaces/IHasChangedWhen.cs +++ b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasChangedWhen.cs @@ -2,7 +2,7 @@ using System; #endif -namespace EnvelopeGenerator.Domain.Interfaces +namespace EnvelopeGenerator.Domain.Interfaces.Auditing { public interface IHasChangedWhen { diff --git a/EnvelopeGenerator.Domain/Interfaces/IHasChangedWho.cs b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasChangedWho.cs similarity index 70% rename from EnvelopeGenerator.Domain/Interfaces/IHasChangedWho.cs rename to EnvelopeGenerator.Domain/Interfaces/Auditing/IHasChangedWho.cs index 2d4110d0..8deab4c6 100644 --- a/EnvelopeGenerator.Domain/Interfaces/IHasChangedWho.cs +++ b/EnvelopeGenerator.Domain/Interfaces/Auditing/IHasChangedWho.cs @@ -1,4 +1,4 @@ -namespace EnvelopeGenerator.Domain.Interfaces +namespace EnvelopeGenerator.Domain.Interfaces.Auditing { public interface IHasChangedWho { diff --git a/EnvelopeGenerator.Domain/Interfaces/Auditing/IUpdateAuditable.cs b/EnvelopeGenerator.Domain/Interfaces/Auditing/IUpdateAuditable.cs new file mode 100644 index 00000000..51a1d2f4 --- /dev/null +++ b/EnvelopeGenerator.Domain/Interfaces/Auditing/IUpdateAuditable.cs @@ -0,0 +1,6 @@ +namespace EnvelopeGenerator.Domain.Interfaces.Auditing +{ + public interface IUpdateAuditable : IHasChangedWhen, IHasChangedWho + { + } +} \ No newline at end of file