currency

Table of Contents

An ISO 4217 currency that can be traded or referenced in financial transactions. Currencies are system-managed reference data shared across all tenants via the system tenant. Each currency carries a code (e.g. USD), name, symbol, and rounding configuration. Currencies have an associated market tier and may appear in party–currency junction records when a party operates in a specific currency.

Codegen models

Source models that drive generation for this entity. Multiple models coexist because the entity spans both the table facet (SQL schema + IO) and the domain entity facet (C++ + Qt).

Artefact Type Archetype
ores.refdata.currency_table.org table model org_entity_meta_model.org
sql_currency_populate.mustache populate template
sql_non_iso_currency_populate.mustache populate template

Missing: domain entity org model (ores.refdata.currency.org) — currency still uses the legacy JSON model path. Required before C++ codegen can regenerate it.

SQL

Schema artefacts. The create script is generated by both the table model (sql_schema_create.mustache, which appends the validate function and is the canonical output) and the domain entity model (sql_schema_domain_entity_create.mustache, which is overwritten).

Artefact Archetype
refdata_currencies_create.sql sql_schema_create.mustache (table), sql_schema_domain_entity_create.mustache (domain entity)
refdata_currencies_drop.sql sql_schema_domain_entity_drop.mustache
refdata_currencies_notify_trigger_create.sql sql_schema_notify_trigger.mustache
refdata_currencies_notify_trigger_drop.sql sql_schema_notify_trigger_drop.mustache
refdata_currencies_test.sql hand-crafted

C++ Domain (refdata.api)

C++ Repository (refdata.core)

C++ Service (refdata.core)

NATS request handler and business logic.

Artefact Archetype
currency_service.hpp cpp_service.hpp.mustache
currency_service.cpp cpp_service.cpp.mustache

C++ Generator (refdata.api)

C++ Messaging

Protocol (request/response types)

Eventing (NATS change events)

Handler (NATS message handlers)

Qt (ores.qt.refdata)

Other projections

Additional projections outside the standard refdata component.

Artefact Component Archetype
currency_dialog.hpp ores.wt.service hand-crafted
currency_dialog.cpp ores.wt.service hand-crafted
currency_list_widget.hpp ores.wt.service hand-crafted
currency_list_widget.cpp ores.wt.service hand-crafted
add_currency_options.hpp ores.cli hand-crafted
add_currency_options.cpp ores.cli hand-crafted
currency_mapper.hpp ores.ore.core hand-crafted
currency_mapper.cpp ores.ore.core hand-crafted
dq_currencies_artefact_create.sql dq hand-crafted
dq_currencies_artefact_drop.sql dq hand-crafted

Tests

Related entities

These are distinct entities closely related to currency. Each has its own entity view (to be created).

  • currency_market_tier — classification of currencies by market liquidity
  • party_currency — junction: currencies a party operates in

Emacs 29.3 (Org mode 9.6.15)