cadrumo.adapters.persistence.profile.justificante module¶
Governed-persistence repository for parsed justificante metadata.
Justificante metadata captures AEAT verification identifiers, operator
identity, timestamps, and verification URLs. The structured metadata is
stored as encrypted byte objects in the primary SQL backend at
SensitivityClass AUDIT
sensitivity; no plaintext metadata JSON or envelope file lands on disk.
This concrete repository is the persistence adapter for the
Justificante audit-sink record. It lives in
the persistence adapter (not in justificante) because its
base SecureBoundRepository is
SQL/crypto-coupled; the domain package owns the pure record and the
JustificanteRepositoryProtocol port.
See also
JustificantePayload model encrypted by this repository.
SecureObjectRepositorySQL object store underlying the bound repository.
- class JustificanteRepository(*, bucket_id=None, objects=None, settings=None)[source]¶
Bases:
SecureBoundRepository[Justificante]Encrypted AUDIT repository for
Justificantemetadata.The
SecureBoundRepositorybase stores eachJustificantein aEnveloperow under the AUDIT justificante-metadata namespace. The AEAT CSV is the natural key, so list and iteration APIs expose persisted receipt metadata without reading plaintext metadata from disk.- Parameters:
bucket_id (str | None)
objects (SecureObjectRepository | None)
settings (Settings | None)
- namespace: ClassVar[str]¶
- sensitivity: ClassVar[SensitivityClass]¶
- schema_version: ClassVar[int]¶
- classmethod payload_model()[source]¶
Return the concrete Pydantic payload model for this repository.
- Return type:
- extract_identifier(payload)[source]¶
Return the natural id for
payload(used as the SQL object key).Subclasses MUST override. The base implementation raises
NotImplementedError.- Return type:
- Parameters:
payload (Justificante)
- iter_justificantes()[source]¶
Yield every persisted justificante, in lexicographic CSV order.
- Return type:
- Returns:
Iterator over
Justificanterecords.