-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.rb
42 lines (41 loc) · 1.56 KB
/
db.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
class Booking
include DataMapper::Resource
property :id, Serial
property :name, String, :required => true
property :email, String, :required => true
property :phone, String, :required => true
property :school, String
property :hostel, String
property :address1, String
property :address2, String
property :zip, String
property :ticket1, Integer, :default => 0
property :ticket2, Integer, :default => 0
property :ticket3, Integer, :default => 0
property :ticket4, Integer, :default => 0
property :ticket5, Integer, :default => 0
property :payment_method, String
property :note, Text
property :paid, Boolean, :default => false
property :placed, DateTime
property :delivered, Boolean, :default => false
end
class Proxy
include DataMapper::Resource
property :id, Serial
property :name, String, :required => true
property :ic, String, :required => true
property :email, String, :required => true
property :phone, String, :required => true
property :school, String
property :hostel, String
property :cat, String
property :ticket1, Integer, :default => 0
property :ticket2, Integer, :default => 0
property :ticket3, Integer, :default => 0
property :payment_method, String
property :note, Text
property :paid, Boolean, :default => false
property :placed, DateTime
property :delivered, Boolean, :default => false
end