You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
53 lines
1.2 KiB
FactoryBot.define do |
|
factory :sales_log do |
|
created_by { FactoryBot.create(:user) } |
|
owning_organisation { created_by.organisation } |
|
managing_organisation { created_by.organisation } |
|
created_at { Time.utc(2022, 2, 8, 16, 52, 15) } |
|
updated_at { Time.utc(2022, 2, 8, 16, 52, 15) } |
|
|
|
trait :in_progress do |
|
purchid { "PC123" } |
|
ownershipsch { 2 } |
|
type { 8 } |
|
saledate { Time.utc(2022, 2, 2, 10, 36, 49) } |
|
end |
|
|
|
trait :completed do |
|
purchid { "PC123" } |
|
ownershipsch { 2 } |
|
type { 8 } |
|
saledate { Time.utc(2022, 2, 2, 10, 36, 49) } |
|
companybuy { 1 } |
|
jointpur { 1 } |
|
beds { 2 } |
|
jointmore { 1 } |
|
noint { 2 } |
|
age1_known { 0 } |
|
age1 { 30 } |
|
sex1 { "X" } |
|
national { 18 } |
|
buy1livein { 1 } |
|
relat2 { "P" } |
|
proptype { 1 } |
|
age2_known { 0 } |
|
age2 { 35 } |
|
builtype { 1 } |
|
ethnic { 3 } |
|
ethnic_group { 12 } |
|
sex2 { "X" } |
|
buy2livein { "1" } |
|
ecstat1 { "1" } |
|
ecstat2 { "1" } |
|
hholdcount { "1" } |
|
wheel { 1 } |
|
age3_known { 0 } |
|
age3 { 40 } |
|
end |
|
|
|
trait :bedsit do |
|
proptype { 2 } |
|
beds { 1 } |
|
end |
|
end |
|
end
|
|
|