Class: DashboardSchema

Inherits:
SchemaRenderer show all
Defined in:
src/ruby/dashboard-schema.rb

Instance Method Summary collapse

Methods inherited from SchemaRenderer

#initialize, #node, #to_dot

Constructor Details

This class inherits a constructor from SchemaRenderer

Instance Method Details

#setupObject



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
# File 'src/ruby/dashboard-schema.rb', line 5

def setup
    node :User do
        string :email
    end
    
    node :Message do
        string :id
        outgoing :TO, :User
        incoming :FROM, :User
    end

    node :Session do
        string :sid
        outgoing :BELONGS_TO, :User
    end
    
    node :Lesson do
    end
    
    node :LessonInfo do
        outgoing :BELONGS_TO, :Lesson
    end
    
    node :Poll do
        incoming :ORGANIZED_BY, :User
    end
    
    node :PollRun do
        outgoing :RUNS, :Poll
        incoming :IS_PARTICIPANT, :User
    end
    
    node :PollResponse do
        outgoing :RESPONSE_BY, :User
        outgoing :RESPONSE_TO, :PollRun
    end
    
end