Finfry::Database
Inherits JSON::Serializable < Reference < Object
The full persisted state: an id counter, all transactions, per-account monthly budget limits (cents), the declared chart of accounts, the unknown-account policy, and the undo journal.
Constructors
Empty. A brand-new book gets its starter chart (DEFAULT_CHART) as the
log's first commit — see Store — so replaying the log from nothing
rebuilds exactly the same chart.
Instance methods
Free-form per-account metadata (account => key => value), e.g. a credit card's apr/limit/due-day. Visible to the AI; secrets are a later feature.
Free-form per-account metadata (account => key => value), e.g. a credit card's apr/limit/due-day. Visible to the AI; secrets are a later feature.
Explicitly declared accounts (the chart). Empty by default so existing ledgers loaded via from_json aren't reseeded.
Explicitly declared accounts (the chart). Empty by default so existing ledgers loaded via from_json aren't reseeded.
Undo journal — one entry per mutating operation, newest last.
Reconciliation, two-tier. cleared is the staged tier — transactions
toggled cleared during a session, still editable (account => [ids]).
reconciled is the committed tier — transactions locked in by a finished,
statement-balanced reconciliation; they drop off the working list.
Reconciliation, two-tier. cleared is the staged tier — transactions
toggled cleared during a session, still editable (account => [ids]).
reconciled is the committed tier — transactions locked in by a finished,
statement-balanced reconciliation; they drop off the working list.
The due queue (generated occurrences awaiting review) + its id counter.
Marks a book of made-up data (the one eg/seed.sh builds), so the UI
can say "example book" vs "real book" and nobody records rent into the
wrong one.
Marks a book of made-up data (the one eg/seed.sh builds), so the UI
can say "example book" vs "real book" and nobody records rent into the
wrong one.
Audit trail of finalized reconciliations, newest last.
The last change removed by undo, available for redo until the next
mutation invalidates it.
The last change removed by undo, available for redo until the next
mutation invalidates it.