2024-07-11 18:42:31 +02:00
|
|
|
# This file should ensure the existence of records required to run the application in every environment (production,
|
|
|
|
# development, test). The code here should be idempotent so that it can be executed at any point in every environment.
|
|
|
|
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
|
|
|
#
|
|
|
|
# Example:
|
|
|
|
#
|
|
|
|
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
|
|
|
|
# MovieGenre.find_or_create_by!(name: genre_name)
|
|
|
|
# end
|
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: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
|
|
|
|
|
|
|
300.times do
|
|
|
|
Guest.create!(first_name: Faker::Name.first_name,
|
|
|
|
last_name: Faker::Name.last_name,
|
|
|
|
email: Faker::Internet.email,
|
|
|
|
phone: Faker::PhoneNumber.cell_phone)
|
|
|
|
end
|