mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-25 08:09:38 +02:00
parent
e8e100e1d8
commit
263d65ea7e
24 changed files with 146 additions and 73 deletions
|
@ -1,7 +1,10 @@
|
|||
class Account < ApplicationRecord
|
||||
VALUE_MODES = %w[balance transactions]
|
||||
|
||||
include Syncable, Monetizable, Issuable
|
||||
|
||||
validates :name, :balance, :currency, presence: true
|
||||
validates :mode, inclusion: { in: VALUE_MODES }, allow_nil: true
|
||||
|
||||
belongs_to :family
|
||||
belongs_to :institution, optional: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue