Settings
One row, one JSON document (settings.data), decoded into SettingsData. The
table is deliberately schemaless — the typed shape lives in Go
(internal/domain/settings/settings.go), which lets the document grow (holidays,
weekend days, description types) without a migration.
| Table | Columns | Notes |
|---|---|---|
settings |
id PK · data (JSON text) |
effectively a singleton: the repo keeps one row and rewrites it whole |
What data holds
school (name/address/phone/email/logo) · currencies (default + enabled) ·
features.multi_currency · decimal_places · description_types (en/ar fee
labels) · payment_methods ({code, en, ar, requires_reference}) ·
holidays (YYYY-MM-DD) · weekend_days. Defaults: USD + the four supported
currencies, multi-currency on, 2 decimals, Friday weekend, the standard fee
types and cash/shamcash methods — all seeded on first read, never written
by SQL.
Where it is read and written
Read through the settings service (cached in memory; invalidated on save) by the money formatter, the payment form, the setup page and the settings form. Written only by the settings save and the first-boot setup, both inside the one-transaction path described in settings. The payment-methods list doubles as the register's method catalog.
Note: this is the host's document. The register plugin's own settings live
in re_settings, behind the settings contract
(plugin tables).
Rendered from simple-lms/data-model/settings.md · OKF bundle · regenerate with npm run render