update model wallet
This commit is contained in:
parent
d480deee64
commit
0f69255422
|
@ -1,2 +1,6 @@
|
|||
class Wallet < ApplicationRecord
|
||||
belongs_to :user
|
||||
has_many :outcome, class_name: 'CoinChange', foreign_key: 'from_wallet_id', dependent: :destroy
|
||||
has_many :income, class_name: 'CoinChange', foreign_key: 'to_wallet_id', dependent: :destroy
|
||||
validates :balance, presence: true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue