-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseeds.rb
73 lines (57 loc) · 4.08 KB
/
seeds.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
# RoomType
RoomType.create( id: 1, denomination: "Matrimonial", amount: 200 )
RoomType.create( id: 2, denomination: "Twin", amount: 100 )
#Group
Group.create( id: 1, name: "Combinada 123-124", amount: 150 )
Group.create( id: 2, name: "Combinada 141-142", amount: 150 )
Group.create( id: 3, name: "Combinada 211-212", amount: 150 )
Group.create( id: 4, name: "Combinada 233-234", amount: 150 )
# Room
Room.create( number: 111, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 112, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 113, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 114, amount: 0, active: true, page_id: 1, room_type_id: 2 )
Room.create( number: 121, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 122, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 123, amount: 0, active: true, page_id: 1, room_type_id: 2, group_id: 1 )
Room.create( number: 124, amount: 0, active: true, page_id: 1, room_type_id: 2, group_id: 1 )
Room.create( number: 131, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 132, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 133, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 134, amount: 0, active: true, page_id: 1, room_type_id: 2 )
Room.create( number: 141, amount: 0, active: true, page_id: 1, room_type_id: 2, group_id: 2 )
Room.create( number: 142, amount: 0, active: true, page_id: 1, room_type_id: 1, group_id: 2 )
Room.create( number: 143, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 144, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 151, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 152, amount: 0, active: true, page_id: 1, room_type_id: 1 )
Room.create( number: 211, amount: 0, active: true, page_id: 2, room_type_id: 1, group_id: 3 )
Room.create( number: 212, amount: 0, active: true, page_id: 2, room_type_id: 2, group_id: 3 )
Room.create( number: 213, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 214, amount: 0, active: true, page_id: 2, room_type_id: 2 )
Room.create( number: 221, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 222, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 223, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 224, amount: 0, active: true, page_id: 2, room_type_id: 2 )
Room.create( number: 231, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 232, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 233, amount: 0, active: true, page_id: 2, room_type_id: 1, group_id: 4 )
Room.create( number: 234, amount: 0, active: true, page_id: 2, room_type_id: 2, group_id: 4 )
Room.create( number: 241, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 242, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 243, amount: 0, active: true, page_id: 2, room_type_id: 1 )
Room.create( number: 244, amount: 0, active: true, page_id: 2, room_type_id: 2 )
# Page
Page.create( id: 1, name: "Pagina 1" )
Page.create( id: 2, name: "Pagina 2" )
# User
User.create( login: "webmaster", password: "asd", password_confirmation: "asd", email: "[email protected]", name: "webmaster", lastname: "webmaster" )
User.create( login: "junzueta", password: "euskadi", password_confirmation: "euskadi", email: "junzueta@completar", name: "Jose", lastname: "Unzueta" )
User.create( login: "aunzueta", password: "euskadi", password_confirmation: "euskadi", email: "aunzueta@completar", name: "Agustin", lastname: "Unzueta" )