forked from faucetsdn/daq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase_schema.txt
More file actions
76 lines (66 loc) · 1.33 KB
/
firebase_schema.txt
File metadata and controls
76 lines (66 loc) · 1.33 KB
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
73
74
75
Table User as U {
id uuid [pk]
email string
name string
updated timestamp
}
Table Permission as P {
id uuid [pk, ref: - U.id]
enabled boolean
}
Table Site {
id String [pk] // eg. ZZ-FRI-FECTA
updated timestamp
}
Table Origin {
id String [pk] // eg. daq-testlab
control String [ref: < Control.id]
device String [ref: < Device.mac]
runner String [ref: - Config.id]
port String [ref: < Port.id]
runid String [ref: < Run.id]
}
Table Device {
mac String [pk]
config String
runid String [ref: < Run.id]
}
Table Control {
id String [pk]
config String [ref: - Config.id]
}
Table Port {
id String [pk]
runid String [ref: < Run.id]
updated timestamp
}
Table Run {
id String [pk]
config String [ref: - Config.id]
test String [ref: < Test.id]
deviceId String [ref: > Device.mac]
port int
siteName String [ref: > Site.id]
updated timestamp
}
Table Test {
id String [pk] // eg ipaddr, bacnet
device_id String [ref: > Device.mac]
name String
port int
runid String [ref: > Run.id]
started timestamp
state String
timestamp timestamp
}
Table Config {
id String [pk] // Only definition, latest
config json // module_config, run_info
port int
device_id String [ref: < Device.mac]
name String
runid String [ref: < Run.id]
started timestamp
state String
timestamp timestamp
}