mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-10 06:49:49 +08:00
update model wallet
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user