2015-09-08 11:44:40 +02:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: transactions
|
|
|
|
#
|
2015-09-14 13:16:01 +02:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# debtor_id :integer not null
|
|
|
|
# creditor_id :integer not null
|
|
|
|
# issuer_id :integer not null
|
|
|
|
# issuer_type :string not null
|
|
|
|
# amount :integer default(0), not null
|
|
|
|
# message :string
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# id_at_client :integer
|
2015-09-08 11:44:40 +02:00
|
|
|
#
|
|
|
|
|
2019-05-30 11:08:46 +02:00
|
|
|
FactoryBot.define do
|
2015-09-08 11:30:11 +02:00
|
|
|
factory :transaction do
|
2015-09-08 14:00:11 +02:00
|
|
|
association :debtor, factory: :user
|
|
|
|
association :creditor, factory: :user
|
2015-09-09 12:52:32 +02:00
|
|
|
issuer { debtor }
|
2015-09-14 16:50:47 +02:00
|
|
|
amount { 1 + rand(10000) }
|
2015-09-08 13:37:30 +02:00
|
|
|
message { Faker::Lorem.sentence }
|
2015-09-14 13:16:01 +02:00
|
|
|
factory :client_transaction do
|
|
|
|
association :issuer, factory: :client
|
|
|
|
sequence :id_at_client
|
|
|
|
end
|
2015-09-08 11:30:11 +02:00
|
|
|
end
|
|
|
|
end
|