add DepositOrder model and query

This commit is contained in:
João Geonizeli
2021-09-05 21:21:10 -03:00
parent bb69836c6c
commit c4e6807d61
11 changed files with 328 additions and 97 deletions

View File

@@ -0,0 +1,28 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: deposit_orders
#
# id :bigint not null, primary key
# paid_amount_cents :integer default(0), not null
# received_amount_cents :integer default(0), not null
# status :string not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :bigint not null
#
# Indexes
#
# index_deposit_orders_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#
FactoryBot.define do
factory :deposit_order do
user { nil }
status { "MyString" }
end
end

View File

@@ -0,0 +1,27 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: deposit_orders
#
# id :bigint not null, primary key
# paid_amount_cents :integer default(0), not null
# received_amount_cents :integer default(0), not null
# status :string not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :bigint not null
#
# Indexes
#
# index_deposit_orders_on_user_id (user_id)
#
# Foreign Keys
#
# fk_rails_... (user_id => users.id)
#
require "rails_helper"
RSpec.describe(DepositOrder, type: :model) do
pending "add some examples to (or delete) #{__FILE__}"
end