Add audit interfaces and fields to domain entities

Introduced interfaces for audit fields (AddedWhen, ChangedWhen, ChangedWho, AddedWho) and updated domain entities to implement them. Adjusted properties for consistency and nullability. Updated MappingProfile to map audit fields between DTOs and entities. Improves auditability and standardization across the domain model.
This commit is contained in:
2026-02-09 15:11:42 +01:00
parent 0fb94decdd
commit e2afbc5a62
15 changed files with 128 additions and 78 deletions

View File

@@ -1,14 +1,13 @@
using System.ComponentModel.DataAnnotations.Schema;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using EnvelopeGenerator.Domain.Interfaces;
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
#if NETFRAMEWORK
using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_RECEIVER_READ_ONLY")]
public class EnvelopeReceiverReadOnly
public class EnvelopeReceiverReadOnly : IHasAddedWhen, IHasChangedWhen, IHasAddedWho
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
@@ -42,16 +41,12 @@ namespace EnvelopeGenerator.Domain.Entities
[Column("ADDED_WHEN")]
[Required]
public DateTime
#if NET
?
#endif
AddedWhen { get; set; }
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHO")]
[StringLength(100)]
public string
#if NET
#if nullable
?
#endif
ChangedWho { get; set; }