From db40ab567cb2f729451145f73d0031a81534c90f Mon Sep 17 00:00:00 2001 From: mahan Date: Thu, 16 Oct 2025 08:01:10 +0330 Subject: [PATCH] refactor: update InstitutionContractAmendment and InstitutionContractAmendmentChange constructors for improved encapsulation --- .../InstitutionContractAgg/InstitutionContract.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Company.Domain/InstitutionContractAgg/InstitutionContract.cs b/Company.Domain/InstitutionContractAgg/InstitutionContract.cs index 1193023d..3984f44a 100644 --- a/Company.Domain/InstitutionContractAgg/InstitutionContract.cs +++ b/Company.Domain/InstitutionContractAgg/InstitutionContract.cs @@ -6,6 +6,7 @@ using System.Security.Cryptography; using _0_Framework.Domain; using Company.Domain.InstitutionContractContactInfoAgg; using CompanyManagment.App.Contracts.InstitutionContract; +using OfficeOpenXml.Table.PivotTable; namespace Company.Domain.InstitutionContractAgg; @@ -252,12 +253,12 @@ public class InstitutionContract : EntityBase public class InstitutionContractAmendment : EntityBase { - public InstitutionContractAmendment(long institutionContractId, InstitutionContract institutionContract, + private InstitutionContractAmendment(){} + public InstitutionContractAmendment(long institutionContractId, List installments, double amount, bool hasInstallment, InstitutionContractAmendmentChange amendmentChange, long lawId) { InstitutionContractId = institutionContractId; - InstitutionContract = institutionContract; Installments = installments is { Count: > 0} ? installments : []; Amount = amount; HasInstallment = hasInstallment; @@ -285,6 +286,7 @@ public class InstitutionContractAmendment : EntityBase public class InstitutionContractAmendmentChange : EntityBase { + private InstitutionContractAmendmentChange() { } private InstitutionContractAmendmentChange(long institutionContractAmendmentId, InstitutionContractAmendment institutionContractAmendment, InstitutionContractAmendmentChangeType changeType, DateTime changeDateGr, bool? hasRollCallPlan, bool? hasCustomizeCheckoutPlan, bool? hasContractPlan,