2024-10-27 21:42:45 +00:00
|
|
|
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
|
2024-08-01 18:27:41 +00:00
|
|
|
NUMBER_OF_GUESTS = 50
|
2024-07-11 20:00:55 +02:00
|
|
|
|
2024-08-01 18:27:41 +00:00
|
|
|
TablesArrangement.delete_all
|
2024-07-11 20:00:55 +02:00
|
|
|
Expense.delete_all
|
2024-07-11 20:11:04 +02:00
|
|
|
Guest.delete_all
|
2024-07-11 20:41:07 +02:00
|
|
|
ActsAsTaggableOn::Tagging.delete_all
|
|
|
|
ActsAsTaggableOn::Tag.delete_all
|
2024-08-11 16:29:10 +02:00
|
|
|
Group.delete_all
|
2024-07-11 20:00:55 +02:00
|
|
|
|
|
|
|
Expense.create!(name: 'Photographer', amount: 3000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Country house', amount: 6000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Catering', amount: 200, pricing_type: 'per_person')
|
|
|
|
Expense.create!(name: 'Flowers', amount: 500, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Band', amount: 1000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Wedding planner', amount: 2000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Dress', amount: 1000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Suit', amount: 500, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Rings', amount: 1000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Makeup', amount: 200, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Hair', amount: 200, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Transportation', amount: 3000, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Invitations', amount: 200, pricing_type: 'fixed')
|
|
|
|
Expense.create!(name: 'Cake', amount: 500, pricing_type: 'fixed')
|
2024-07-11 20:11:04 +02:00
|
|
|
|
2024-08-11 18:25:12 +02:00
|
|
|
Group.create!(name: "Jim's guests", icon: 'pi pi-heart').tap do |parent|
|
|
|
|
parent.children.create!(name: "Jim's family", icon: 'pi pi-users').tap do |family|
|
|
|
|
family.children.create!(name: "Jim's close family", icon: 'pi pi-home')
|
|
|
|
family.children.create!(name: "Jim's cousins", icon: 'pi pi-home')
|
|
|
|
family.children.create!(name: "Jim's relatives", icon: 'pi pi-home')
|
|
|
|
end
|
|
|
|
parent.children.create!(name: "Jim's friends", icon: 'pi pi-bullseye')
|
|
|
|
parent.children.create!(name: "Jim's work", icon: 'pi pi-desktop').tap do |work|
|
|
|
|
work.children.create!(name: "Jim's besties at work", icon: 'pi pi-briefcase')
|
2024-08-11 17:26:43 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-08-11 18:25:12 +02:00
|
|
|
Group.create!(name: "Pam's guests", icon: 'pi pi-heart-fill').tap do |parent|
|
|
|
|
parent.children.create!(name: "Pam's family", icon: 'pi pi-users').tap do |family|
|
|
|
|
family.children.create!(name: "Pam's close family", icon: 'pi pi-home')
|
|
|
|
family.children.create!(name: "Pam's cousins", icon: 'pi pi-home')
|
|
|
|
family.children.create!(name: "Pam's relatives", icon: 'pi pi-home')
|
|
|
|
end
|
|
|
|
parent.children.create!(name: "Pam's friends", icon: 'pi pi-bullseye')
|
|
|
|
parent.children.create!(name: "Pam's work", icon: 'pi pi-desktop').tap do |work|
|
|
|
|
work.children.create!(name: "Pam's besties at work", icon: 'pi pi-briefcase')
|
2024-08-11 17:26:43 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-08-11 18:25:12 +02:00
|
|
|
Group.create!(name: 'Common guests', icon: 'pi pi-users').tap do |parent|
|
|
|
|
parent.children.create!(name: 'College friends', icon: 'pi pi-calculator')
|
|
|
|
parent.children.create!(name: 'High school friends', icon: 'pi pi-crown')
|
|
|
|
parent.children.create!(name: 'Childhood friends', icon: 'pi pi-envelope')
|
2024-08-11 17:26:43 +02:00
|
|
|
end
|
2024-07-31 20:58:47 +02:00
|
|
|
|
2024-08-11 18:25:12 +02:00
|
|
|
groups = Group.all
|
2024-07-11 23:25:29 +02:00
|
|
|
|
2024-08-01 18:27:41 +00:00
|
|
|
NUMBER_OF_GUESTS.times do
|
2024-08-11 18:25:12 +02:00
|
|
|
Guest.create!(
|
|
|
|
first_name: Faker::Name.first_name,
|
|
|
|
last_name: Faker::Name.last_name,
|
|
|
|
email: Faker::Internet.email,
|
|
|
|
phone: Faker::PhoneNumber.cell_phone,
|
2024-08-11 19:24:24 +02:00
|
|
|
group: groups.sample,
|
|
|
|
status: Guest.statuses.keys.sample
|
2024-08-11 18:25:12 +02:00
|
|
|
)
|
2024-07-11 23:39:40 +02:00
|
|
|
end
|