mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-08 14:11:42 +08:00
create coinchange
This commit is contained in:
2
app/models/coin_change.rb
Normal file
2
app/models/coin_change.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
class CoinChange < ApplicationRecord
|
||||
end
|
||||
13
db/migrate/20200724094729_create_coin_changes.rb
Normal file
13
db/migrate/20200724094729_create_coin_changes.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateCoinChanges < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :coin_changes do |t|
|
||||
t.integer :amount
|
||||
t.string :description
|
||||
t.string :reason
|
||||
t.integer :to_wallet_id
|
||||
t.integer :from_wallet_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
5
spec/models/coin_change_spec.rb
Normal file
5
spec/models/coin_change_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe CoinChange, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
Reference in New Issue
Block a user