add BuyCryptoOrder and SellCryptoOrder entities

This commit is contained in:
João Geonizeli
2021-08-14 17:42:19 -03:00
parent 30ab1b11f1
commit 57a3fcf25f
12 changed files with 437 additions and 49 deletions

View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
class CreateSellCryptoOrders < ActiveRecord::Migration[6.1]
def change
create_table(:sell_crypto_orders) do |t|
t.references(:user, null: false, foreign_key: true)
t.references(:currency, null: false, foreign_key: true)
t.string(:status, null: false)
t.decimal(:paid_amount, precision: 20, scale: 10, null: false, default: 0)
t.integer(:received_amount_cents, null: true)
t.timestamps
end
end
end