Browse Source

create table wallet

tags/v1
wyx 6 years ago
parent
commit
33951af37d
3 changed files with 17 additions and 0 deletions
  1. +2
    -0
      app/models/wallet.rb
  2. +10
    -0
      db/migrate/20200724094458_create_wallets.rb
  3. +5
    -0
      spec/models/wallet_spec.rb

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

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

+ 10
- 0
db/migrate/20200724094458_create_wallets.rb View File

@@ -0,0 +1,10 @@
class CreateWallets < ActiveRecord::Migration[5.2]
def change
create_table :wallets do |t|
t.integer :balance
t.integer :user_id

t.timestamps
end
end
end

+ 5
- 0
spec/models/wallet_spec.rb View File

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

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

Loading…
Cancel
Save