add amount.mli

This commit is contained in:
swrup 2025-11-20 22:14:45 +01:00
parent 58bce4efa2
commit 9b760b436f
5 changed files with 48 additions and 17 deletions

View file

@ -17,7 +17,7 @@ let pg_amount : Amount.t Caqti_type.t =
Caqti_type.custom
~encode:(fun amount -> Ok (amount.value, amount.fraction))
~decode:(fun (value, fraction) ->
Ok { sign= None; currency= `Eur; value; fraction })
Amount.make ~sign:None ~currency:Config.currency ~value ~fraction)
Caqti_type.(t2 int64 int32)
(* WIP: minimum db functions for basic /management *)