aeat.adapters.persistence.profile.filing_amendments module¶
Governed-persistence repository for filing amendments.
Filing amendments carry corrected casilla deltas and original
submission references. They are stored as encrypted byte objects via
SecureObjectRepository at
AUDIT SensitivityClass
sensitivity; no plaintext amendment JSON or envelope file lands on disk. Each
record is wrapped in an
Envelope before serialisation.
This concrete repository is the persistence adapter behind the
ModeloAmendmentRepositoryProtocol port. It lives
in the persistence adapter (not in domain.filing) because its
secure-object coupling is SQL/crypto-bound; the domain package owns only the
typed BaseAmendment payload shapes.
See also
BaseAmendmentShared typed payload shape saved by this repository.
ModeloComplementariaLGT Art. 122.2 amendment variant for additional self-assessment.
ModeloSustitutivaLGT Art. 122.1 amendment variant for full replacement.
adapters.persistence.storage.FILING_AMENDMENTS_NAMESPACENamespace, sensitivity, schema-version, object-key, and custody contract for amendment secure objects.
application.filing.build_complementaria()Application orchestration entry point that can produce and persist an amendment.
- class ModeloAmendmentRepository(*, bucket_id=None, objects=None)[source]¶
Bases:
objectEncrypted AUDIT repository for
BaseAmendmentrecords.Persists
ModeloComplementariaandModeloSustitutivapayloads underadapters.persistence.storage.FILING_AMENDMENTS_NAMESPACE. The repository wraps the amendment union in anEnvelopebefore writing throughSecureObjectRepository; the amendment id is the natural key used for load, delete, and ordered iteration. The namespace definition supplies theAUDITSensitivityClass, schema version, object-key grammar, and custody contract.- Parameters:
bucket_id (str | None)
objects (SecureObjectRepository | None)
- envelope_path_for(amendment_id)[source]¶
Return a logical object marker for
amendment_id.- Return type:
Path- Parameters:
amendment_id (str)
- lock_target_for(amendment_id)[source]¶
Return a logical lock marker; SQL transactions govern writes.
- Return type:
Path- Parameters:
amendment_id (str)
- save(amendment)[source]¶
Persist
amendmentin the encrypted database object store.The row is stored under
adapters.persistence.storage.FILING_AMENDMENTS_NAMESPACE.- Return type:
- Parameters:
amendment (BaseAmendment)