aeat.domain.calculations._export_field_kind module

Registry-authoritative enum for export field classification.

This module is isolated from the registry compilation logic to allow domain.user_profile to reference CasillaFieldKind without triggering the full registry parse at CLI boot.

class CasillaFieldKind(*values)[source]

Bases: StrEnum

Registry-authoritative classification of how an export field is populated.

Each member’s string value matches the TOML literal used in registry source files (modelo/<n>/exports/*.toml), so serialisation is transparent across every persistence boundary.

Variables:
  • LITERAL – Field emits a constant string declared in literal.

  • CASILLA – Field derives its value from a named casilla.

  • BINDING – Field derives its value from a named binding.

  • COMPUTED – Field is synthesised at export time via computed_key.

  • DRAFT – Field is drawn from a draft attribute via draft_attribute.

  • FILLER – Field is a fixed-width pad with no semantic value.

  • HEADER – Field emits a record-type header value via header_key.

  • CHECKSUM – Field carries a record-level checksum.

LITERAL
CASILLA
BINDING
COMPUTED
DRAFT
FILLER
HEADER
CHECKSUM
CasillaFieldKindValue

Annotated CasillaFieldKind that coerces TOML string literals to enum members.

Use this as the field type on pydantic models that ingest TOML or JSON payloads where kind is stored as a plain string.

alias of Annotated[CasillaFieldKind, BeforeValidator(func=_coerce_casilla_field_kind, json_schema_input_type=PydanticUndefined)]