Skip to content

Commit 64f73e6

Browse files
committed
docs(skills): the record currency code field is named currency_code by convention, not by contract
ADR-0144 D8 rule 2: every currency-related field is declared by the app author and referenced by pointer, and its name is guidance, never a contract. Claude-Session: https://claude.ai/code/session_01Utp6CYWaabH6fd31U9CyS7 Co-authored-by: Claude <noreply@anthropic.com>
1 parent f4d4463 commit 64f73e6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎.changeset/27189-record-currency-skills.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
'@objectstack/skills': patch
33
---
44

5-
docs(skills): the dashboards guide says how a record-currency amount behaves in a dataset measure
5+
docs(skills): the dashboards guide says how a record-currency amount behaves in a dataset measure; the code field's name is a convention
66

77
Clause-②: no
88
Metadata-protocol: none
99

1010
⛔ Not released alone: this ships in the same release as the `currencyMode: 'record'` mode, its refusals and its per-row display (ADR-0144 D9, release R1).
1111

1212
- **`objectstack-ui/rules/dashboards.md`**: a measure over a `currencyMode: 'record'` amount refuses a measure `currency` and an ungrouped `sum` / `avg` / `min` / `max`. Grouped by the amount's code field, its result column carries `currencyField`, which names the per-row code column, and a `count` column never does.
13+
- **`objectstack-data/rules/field-types.md`**: a record-mode amount's code field is named `currency_code` by convention, not by contract; any `text` field with `valueDomain: 'iso_4217_currency'` that `currencyField` names will do.

‎skills/objectstack-data/rules/field-types.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Stored as JSON on the parent row — no separate table / FK:
181181
`{ value, currency }`. Shown: `'fixed'`, `defaultCurrency`; `'dynamic'`
182182
(default), the tenant `localization.currency`, else a plain number (never
183183
`$`); `'record'`, each record's code in the `text` field `currencyField`
184-
names, declaring `valueDomain: 'iso_4217_currency'`. Under
184+
names (by convention `currency_code`), with `valueDomain: 'iso_4217_currency'`. Under
185185
`'fixed'`/`'dynamic'` a measure's own `currency` wins.
186186

187187
### Select with Default

0 commit comments

Comments
 (0)