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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user