From 1305714da262d40b9f2a16a0fe8b177d6b000afc Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 20 Jan 2026 10:30:07 +0100 Subject: [PATCH] Move ReadOnly property from Envelope to EnvelopeDto The ReadOnly property logic was shifted from the Envelope entity to the EnvelopeDto record, ensuring that read-only status is determined at the DTO layer rather than in the data model. --- EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs | 5 +++++ EnvelopeGenerator.Domain/Entities/Envelope.cs | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs b/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs index 7331d1b7..029d621a 100644 --- a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs +++ b/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs @@ -74,6 +74,11 @@ public record EnvelopeDto /// public int? EnvelopeTypeId { get; set; } + /// + /// + /// + public bool ReadOnly => EnvelopeTypeId == 2; + /// /// /// diff --git a/EnvelopeGenerator.Domain/Entities/Envelope.cs b/EnvelopeGenerator.Domain/Entities/Envelope.cs index 94e3b6c1..741a3b93 100644 --- a/EnvelopeGenerator.Domain/Entities/Envelope.cs +++ b/EnvelopeGenerator.Domain/Entities/Envelope.cs @@ -108,10 +108,6 @@ 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; }