fix(membership-fees): add DB constraints for enum and decimal precision
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Moritz 2025-12-11 17:06:10 +01:00 committed by moritz
parent 968ad9a8fd
commit a3aa61a89e
6 changed files with 81 additions and 8 deletions

View file

@ -65,7 +65,10 @@ defmodule Mv.MembershipFees.MembershipFeeCycle do
attribute :amount, :decimal do
allow_nil? false
public? true
description "Fee amount for this cycle (stored for audit trail)"
description "Fee amount for this cycle (stored for audit trail, non-negative, max 2 decimal places)"
constraints min: 0, scale: 2
end
attribute :status, :atom do