CurrencyPairDO.ktRepresents a currency pair for foreign exchange conversion (e.g. USD → EUR). Each pair links a source currency to a target currency. The pair itself does not contain conversion rates — those are held by child CurrencyConversionRateDO entities with validity periods. A transient rates list is populated by CurrencyConversionCache for in-memory access.
| Table | t_fibu_currency_pair |
|---|---|
| Unique Constraint | (source_currency, target_currency) — prevents duplicate pairs |
| Indexes | idx_t_fibu_currency_pair_source, idx_t_fibu_currency_pair_target |
| Annotations | @Indexed, @AUserRightId("FIBU_CURRENCY_CONVERSION") |
| Field | Type | Column | Constraints | Search | Description |
|---|---|---|---|---|---|
sourceCurrency | String? | source_currency | Length 3, not null | @FullTextField | ISO 4217 currency code (source) |
targetCurrency | String? | target_currency | Length 3, not null | @FullTextField | ISO 4217 currency code (target) |
comment | String? | — | Max COMMENT_LENGTH | @FullTextField | Optional description |
rates | MutableList<CurrencyConversionRateDO>? | — | @Transient | — | Populated by cache; not persisted |
displayName as "USD → EUR"equals() and hashCode() are overridden to use the id field. If the id is null, falls back to the DefaultBaseDO implementation.
Annotated with @AUserRightId("FIBU_CURRENCY_CONVERSION"), linking this entity to the FIBU_CURRENCY_CONVERSION user right for access control checks throughout the persistence layer.
868d6abb7 2025 -> 2026 07edc85de WIP: currency conversion with Claude Code. 357ebee61 WIP: currency conversion with Claude Code. 73b486107 WIP: currency conversion with Claude Code. bd69407de Initial revision with Claude Code.