fix(membership-fees): add DB constraints for enum and decimal precision
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
b37c312b15
commit
caebcefb8c
6 changed files with 81 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue