Add deposits read table (CQRS projection from bank_to_exchange events)

Project each bank_to_exchange event into a denormalized deposits table
with pre-computed EUR, DKK, and USD amounts using Frankfurter currency
rates. Replaces the aggregate get-deposit-totals query.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 12:52:32 +01:00
co-authored by Claude Opus 4.6
parent 0446d928e6
commit 174ea24786
5 changed files with 89 additions and 19 deletions
+2 -2
View File
@@ -173,8 +173,8 @@
["/events"
{:get (fn [req] (tx/list-events opts req))
:post (fn [req] (tx/create-event! opts req))}]
["/deposits/totals"
{:get (fn [req] (tx/get-deposit-totals opts req))}]])
["/deposits"
{:get (fn [req] (tx/list-deposits opts req))}]])
(defn route-data [opts]
(merge