From 2779452d724343870bf3f1c2316a1437541ebee0 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 27 Jan 2026 11:49:02 +0100 Subject: [PATCH] Add ReadOnly property to Envelope class Added a ReadOnly property to the Envelope class that returns true when EnvelopeTypeId is 2. The property is marked with [JsonIgnore] and [NotMapped] to exclude it from JSON serialization and database mapping. --- EnvelopeGenerator.Domain/Entities/Envelope.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EnvelopeGenerator.Domain/Entities/Envelope.cs b/EnvelopeGenerator.Domain/Entities/Envelope.cs index 741a3b93..fadf40e9 100644 --- a/EnvelopeGenerator.Domain/Entities/Envelope.cs +++ b/EnvelopeGenerator.Domain/Entities/Envelope.cs @@ -108,6 +108,10 @@ public class Envelope [Column("ENVELOPE_TYPE")] public int? EnvelopeTypeId { get; set; } + [JsonIgnore] + [NotMapped] + public bool ReadOnly => EnvelopeTypeId == 2; + [Column("CERTIFICATION_TYPE")] public int? CertificationType { get; set; }