Browse Source

create coinchange

tags/v1
wyx 6 years ago
parent
commit
98176f839d
3 changed files with 20 additions and 0 deletions
  1. +2
    -0
      app/models/coin_change.rb
  2. +13
    -0
      db/migrate/20200724094729_create_coin_changes.rb
  3. +5
    -0
      spec/models/coin_change_spec.rb

+ 2
- 0
app/models/coin_change.rb View File

@@ -0,0 +1,2 @@
class CoinChange < ApplicationRecord
end

+ 13
- 0
db/migrate/20200724094729_create_coin_changes.rb View 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
- 0
spec/models/coin_change_spec.rb View File

@@ -0,0 +1,5 @@
require 'rails_helper'

RSpec.describe CoinChange, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
end

Loading…
Cancel
Save