From 2d0c08b2cea81119c597b583adda765defe182b6 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 4 Mar 2026 14:19:02 +0100 Subject: [PATCH] Implement IEnvelope and update Envelope.ReadOnly property Envelope now implements the IEnvelope interface. The ReadOnly property is marked as [Obsolete] and delegates to the IsReadAndConfirm extension method instead of directly checking EnvelopeTypeId. Added a using directive for EnvelopeGenerator.Domain.Interfaces. --- EnvelopeGenerator.Domain/Entities/Envelope.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/EnvelopeGenerator.Domain/Entities/Envelope.cs b/EnvelopeGenerator.Domain/Entities/Envelope.cs index 21e52a9d..5ba90338 100644 --- a/EnvelopeGenerator.Domain/Entities/Envelope.cs +++ b/EnvelopeGenerator.Domain/Entities/Envelope.cs @@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema; using EnvelopeGenerator.Domain.Constants; using Newtonsoft.Json; using EnvelopeGenerator.Domain.Interfaces.Auditing; +using EnvelopeGenerator.Domain.Interfaces; #if NETFRAMEWORK using System.Collections.Generic; using System.Linq; @@ -13,7 +14,7 @@ using System.Linq; namespace EnvelopeGenerator.Domain.Entities { [Table("TBSIG_ENVELOPE", Schema = "dbo")] - public class Envelope : IHasAddedWhen, IHasChangedWhen + public class Envelope : IHasAddedWhen, IHasChangedWhen, IEnvelope { public Envelope() { @@ -106,7 +107,8 @@ namespace EnvelopeGenerator.Domain.Entities [JsonIgnore] [NotMapped] - public bool ReadOnly => EnvelopeTypeId == 2; + [Obsolete("Use EnvelopeGenerator.Domain.Interfaces.EnvelopeExtensions.IsReadAndConfirm extension method instead.")] + public bool ReadOnly => this.IsReadAndConfirm(); [Column("CERTIFICATION_TYPE")] public int? CertificationType { get; set; }