-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_schema.rb
54 lines (43 loc) · 1.33 KB
/
db_schema.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
# Define tables
class Categories
include DataMapper::Resource
property :id, Serial
property :name, String, :required => true
property :parent, Integer, :required => true
property :deleted, Boolean, :default => false
end
class Pages
include DataMapper::Resource
property :id, Serial
property :name, String, :required => true
property :parent, Integer, :required => true
property :deleted, Boolean, :default => false
property :current_revision, Integer, :required => true
end
class Page_revisions
include DataMapper::Resource
property :id, Serial
property :parent, Integer, :required => true
property :create_time, DateTime, :required => true
property :text, Text
property :comment, Text
end
class Page_comments
include DataMapper::Resource
property :id, Serial
property :parent, Integer, :required => true
property :root, Boolean, :default => false
property :author, Integer, :required => true
property :create_time, DateTime, :required => true
property :text, Text
property :deleted, Boolean, :default => false
end
class Users
include DataMapper::Resource
property :id, Serial
property :username, String, :required => true
property :password, String, :required => true
property :real_name, String, :required => true
property :email, String, :required => true
property :www, String
end