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,11 +1,12 @@
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
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;
|
||||
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#endif
|
||||
@@ -14,11 +15,11 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
|
||||
public class Envelope
|
||||
public class Envelope : IHasAddedWhen, IHasChangedWhen
|
||||
{
|
||||
public Envelope()
|
||||
{
|
||||
@@ -77,7 +78,7 @@ public class Envelope
|
||||
|
||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||
public string
|
||||
#if NET
|
||||
#if nullable
|
||||
?
|
||||
#endif
|
||||
Title { get; set; }
|
||||
@@ -142,15 +143,14 @@ public class Envelope
|
||||
[NotMapped]
|
||||
[Column("DOC_RESULT")]
|
||||
public byte[]
|
||||
#if NET
|
||||
#if nullable
|
||||
?
|
||||
#endif
|
||||
DocResult
|
||||
{ get; set; }
|
||||
DocResult { get; set; }
|
||||
|
||||
[ForeignKey("EnvelopeTypeId")]
|
||||
public virtual EnvelopeType
|
||||
#if NET
|
||||
#if nullable
|
||||
?
|
||||
#endif
|
||||
Type { get; set; }
|
||||
@@ -164,19 +164,19 @@ public class Envelope
|
||||
#endif
|
||||
|
||||
public List<Document>
|
||||
#if NET
|
||||
#if nullable
|
||||
?
|
||||
#endif
|
||||
Documents { get; set; }
|
||||
|
||||
public List<History>
|
||||
#if NET
|
||||
#if nullable
|
||||
?
|
||||
#endif
|
||||
Histories { get; set; }
|
||||
|
||||
public List<EnvelopeReceiver>
|
||||
#if NET
|
||||
#if nullable
|
||||
?
|
||||
#endif
|
||||
EnvelopeReceivers { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user