db_model.svg 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
  3. "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
  4. <!-- Generated by graphviz version 2.43.0 (0)
  5. -->
  6. <!-- Title: maplog Pages: 1 -->
  7. <svg width="1405pt" height="485pt"
  8. viewBox="0.00 0.00 1404.50 485.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  9. <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 481)">
  10. <title>maplog</title>
  11. <polygon fill="white" stroke="transparent" points="-4,4 -4,-481 1400.5,-481 1400.5,4 -4,4"/>
  12. <!-- action -->
  13. <g id="node1" class="node">
  14. <title>action</title>
  15. <polygon fill="none" stroke="black" points="179,-181.5 179,-250.5 340,-250.5 340,-181.5 179,-181.5"/>
  16. <text text-anchor="middle" x="259.5" y="-235.3" font-family="Times,serif" font-size="14.00">action</text>
  17. <polyline fill="none" stroke="black" points="179,-227.5 340,-227.5 "/>
  18. <text text-anchor="start" x="187" y="-212.3" font-family="Times,serif" font-size="14.00">name : varchar(100)</text>
  19. <polyline fill="none" stroke="black" points="179,-204.5 340,-204.5 "/>
  20. <text text-anchor="start" x="187" y="-189.3" font-family="Times,serif" font-size="14.00">action_id : integer</text>
  21. </g>
  22. <!-- campaign -->
  23. <g id="node2" class="node">
  24. <title>campaign</title>
  25. <polygon fill="none" stroke="black" points="918.5,-159 918.5,-273 1212.5,-273 1212.5,-159 918.5,-159"/>
  26. <text text-anchor="middle" x="1065.5" y="-257.8" font-family="Times,serif" font-size="14.00">campaign</text>
  27. <polyline fill="none" stroke="black" points="918.5,-250 1212.5,-250 "/>
  28. <text text-anchor="start" x="926.5" y="-234.8" font-family="Times,serif" font-size="14.00">name : text</text>
  29. <text text-anchor="start" x="926.5" y="-219.8" font-family="Times,serif" font-size="14.00"> description : text</text>
  30. <text text-anchor="start" x="926.5" y="-204.8" font-family="Times,serif" font-size="14.00"> from_time : timestamp with time zone</text>
  31. <text text-anchor="start" x="926.5" y="-189.8" font-family="Times,serif" font-size="14.00"> to_time : timestamp with time zone</text>
  32. <polyline fill="none" stroke="black" points="918.5,-182 1212.5,-182 "/>
  33. <text text-anchor="start" x="926.5" y="-166.8" font-family="Times,serif" font-size="14.00">id : integer</text>
  34. </g>
  35. <!-- driver -->
  36. <g id="node3" class="node">
  37. <title>driver</title>
  38. <polygon fill="none" stroke="black" points="0,-181.5 0,-250.5 161,-250.5 161,-181.5 0,-181.5"/>
  39. <text text-anchor="middle" x="80.5" y="-235.3" font-family="Times,serif" font-size="14.00">driver</text>
  40. <polyline fill="none" stroke="black" points="0,-227.5 161,-227.5 "/>
  41. <text text-anchor="start" x="8" y="-212.3" font-family="Times,serif" font-size="14.00">name : varchar(100)</text>
  42. <polyline fill="none" stroke="black" points="0,-204.5 161,-204.5 "/>
  43. <text text-anchor="start" x="8" y="-189.3" font-family="Times,serif" font-size="14.00">driver_id : integer</text>
  44. </g>
  45. <!-- driver_to_action -->
  46. <g id="node4" class="node">
  47. <title>driver_to_action</title>
  48. <polygon fill="none" stroke="black" points="93.5,-340 93.5,-469 387.5,-469 387.5,-340 93.5,-340"/>
  49. <text text-anchor="middle" x="240.5" y="-453.8" font-family="Times,serif" font-size="14.00">driver_to_action</text>
  50. <polyline fill="none" stroke="black" points="93.5,-446 387.5,-446 "/>
  51. <text text-anchor="start" x="101.5" y="-430.8" font-family="Times,serif" font-size="14.00">driver_id : integer</text>
  52. <text text-anchor="start" x="101.5" y="-415.8" font-family="Times,serif" font-size="14.00"> action_id : integer</text>
  53. <text text-anchor="start" x="101.5" y="-400.8" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
  54. <text text-anchor="start" x="101.5" y="-385.8" font-family="Times,serif" font-size="14.00"> from_time : timestamp with time zone</text>
  55. <text text-anchor="start" x="101.5" y="-370.8" font-family="Times,serif" font-size="14.00"> to_time : timestamp with time zone</text>
  56. <polyline fill="none" stroke="black" points="93.5,-363 387.5,-363 "/>
  57. <text text-anchor="start" x="101.5" y="-347.8" font-family="Times,serif" font-size="14.00">id : integer</text>
  58. </g>
  59. <!-- driver_to_action&#45;&gt;action -->
  60. <g id="edge1" class="edge">
  61. <title>driver_to_action&#45;&gt;action</title>
  62. <path fill="none" stroke="#595959" d="M259.5,-339.89C259.5,-339.89 259.5,-260.61 259.5,-260.61"/>
  63. <polygon fill="#595959" stroke="#595959" points="263,-260.61 259.5,-250.61 256,-260.61 263,-260.61"/>
  64. <text text-anchor="middle" x="291.5" y="-302.8" font-family="Times,serif" font-size="14.00">action_id</text>
  65. </g>
  66. <!-- driver_to_action&#45;&gt;driver -->
  67. <g id="edge2" class="edge">
  68. <title>driver_to_action&#45;&gt;driver</title>
  69. <path fill="none" stroke="#595959" d="M127.25,-339.89C127.25,-339.89 127.25,-260.61 127.25,-260.61"/>
  70. <polygon fill="#595959" stroke="#595959" points="130.75,-260.61 127.25,-250.61 123.75,-260.61 130.75,-260.61"/>
  71. <text text-anchor="middle" x="112.5" y="-302.8" font-family="Times,serif" font-size="14.00">driver_id</text>
  72. </g>
  73. <!-- unit -->
  74. <g id="node9" class="node">
  75. <title>unit</title>
  76. <polygon fill="none" stroke="black" points="609.5,-151.5 609.5,-280.5 805.5,-280.5 805.5,-151.5 609.5,-151.5"/>
  77. <text text-anchor="middle" x="707.5" y="-265.3" font-family="Times,serif" font-size="14.00">unit</text>
  78. <polyline fill="none" stroke="black" points="609.5,-257.5 805.5,-257.5 "/>
  79. <text text-anchor="start" x="617.5" y="-242.3" font-family="Times,serif" font-size="14.00">imei : varchar(20)</text>
  80. <text text-anchor="start" x="617.5" y="-227.3" font-family="Times,serif" font-size="14.00"> description : text</text>
  81. <text text-anchor="start" x="617.5" y="-212.3" font-family="Times,serif" font-size="14.00"> is_mobile : boolean</text>
  82. <text text-anchor="start" x="617.5" y="-197.3" font-family="Times,serif" font-size="14.00"> unit_type_id : varchar(2)</text>
  83. <text text-anchor="start" x="617.5" y="-182.3" font-family="Times,serif" font-size="14.00"> name : varchar(100)</text>
  84. <polyline fill="none" stroke="black" points="609.5,-174.5 805.5,-174.5 "/>
  85. <text text-anchor="start" x="617.5" y="-159.3" font-family="Times,serif" font-size="14.00">unit_id : bigint</text>
  86. </g>
  87. <!-- driver_to_action&#45;&gt;unit -->
  88. <g id="edge3" class="edge">
  89. <title>driver_to_action&#45;&gt;unit</title>
  90. <path fill="none" stroke="#595959" d="M382,-339.79C382,-317.48 382,-298 382,-298 382,-298 658.5,-298 658.5,-298 658.5,-298 658.5,-290.61 658.5,-290.61"/>
  91. <polygon fill="#595959" stroke="#595959" points="662,-290.61 658.5,-280.61 655,-290.61 662,-290.61"/>
  92. <text text-anchor="middle" x="409" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
  93. </g>
  94. <!-- obs_telemetry -->
  95. <g id="node5" class="node">
  96. <title>obs_telemetry</title>
  97. <polygon fill="none" stroke="black" points="564,-332.5 564,-476.5 885,-476.5 885,-332.5 564,-332.5"/>
  98. <text text-anchor="middle" x="724.5" y="-461.3" font-family="Times,serif" font-size="14.00">obs_telemetry</text>
  99. <polyline fill="none" stroke="black" points="564,-453.5 885,-453.5 "/>
  100. <text text-anchor="start" x="572" y="-438.3" font-family="Times,serif" font-size="14.00">time_stamp : timestamp with time zone</text>
  101. <text text-anchor="start" x="572" y="-423.3" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
  102. <text text-anchor="start" x="572" y="-408.3" font-family="Times,serif" font-size="14.00"> observed_values : jsonb</text>
  103. <text text-anchor="start" x="572" y="-393.3" font-family="Times,serif" font-size="14.00"> time_received : timestamp with time zone</text>
  104. <text text-anchor="start" x="572" y="-378.3" font-family="Times,serif" font-size="14.00"> the_geom : geometry</text>
  105. <text text-anchor="start" x="572" y="-363.3" font-family="Times,serif" font-size="14.00"> speed : integer</text>
  106. <polyline fill="none" stroke="black" points="564,-355.5 885,-355.5 "/>
  107. <text text-anchor="start" x="572" y="-340.3" font-family="Times,serif" font-size="14.00">id : bigint</text>
  108. </g>
  109. <!-- obs_telemetry&#45;&gt;unit -->
  110. <g id="edge4" class="edge">
  111. <title>obs_telemetry&#45;&gt;unit</title>
  112. <path fill="none" stroke="#595959" d="M756.5,-332.43C756.5,-332.43 756.5,-290.62 756.5,-290.62"/>
  113. <polygon fill="#595959" stroke="#595959" points="760,-290.62 756.5,-280.62 753,-290.62 760,-290.62"/>
  114. <text text-anchor="middle" x="749" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
  115. </g>
  116. <!-- phenomenon -->
  117. <g id="node6" class="node">
  118. <title>phenomenon</title>
  119. <polygon fill="none" stroke="black" points="401,-0.5 401,-99.5 550,-99.5 550,-0.5 401,-0.5"/>
  120. <text text-anchor="middle" x="475.5" y="-84.3" font-family="Times,serif" font-size="14.00">phenomenon</text>
  121. <polyline fill="none" stroke="black" points="401,-76.5 550,-76.5 "/>
  122. <text text-anchor="start" x="409" y="-61.3" font-family="Times,serif" font-size="14.00">name : text</text>
  123. <text text-anchor="start" x="409" y="-46.3" font-family="Times,serif" font-size="14.00"> uom : varchar(30)</text>
  124. <text text-anchor="start" x="409" y="-31.3" font-family="Times,serif" font-size="14.00"> uom_link : text</text>
  125. <polyline fill="none" stroke="black" points="401,-23.5 550,-23.5 "/>
  126. <text text-anchor="start" x="409" y="-8.3" font-family="Times,serif" font-size="14.00">id : integer</text>
  127. </g>
  128. <!-- sensor -->
  129. <g id="node7" class="node">
  130. <title>sensor</title>
  131. <polygon fill="none" stroke="black" points="376.5,-151.5 376.5,-280.5 574.5,-280.5 574.5,-151.5 376.5,-151.5"/>
  132. <text text-anchor="middle" x="475.5" y="-265.3" font-family="Times,serif" font-size="14.00">sensor</text>
  133. <polyline fill="none" stroke="black" points="376.5,-257.5 574.5,-257.5 "/>
  134. <text text-anchor="start" x="384.5" y="-242.3" font-family="Times,serif" font-size="14.00">name : varchar(100)</text>
  135. <text text-anchor="start" x="384.5" y="-227.3" font-family="Times,serif" font-size="14.00"> type : text</text>
  136. <text text-anchor="start" x="384.5" y="-212.3" font-family="Times,serif" font-size="14.00"> io_id : integer</text>
  137. <text text-anchor="start" x="384.5" y="-197.3" font-family="Times,serif" font-size="14.00"> phenomenon_id : integer</text>
  138. <text text-anchor="start" x="384.5" y="-182.3" font-family="Times,serif" font-size="14.00"> description : text</text>
  139. <polyline fill="none" stroke="black" points="376.5,-174.5 574.5,-174.5 "/>
  140. <text text-anchor="start" x="384.5" y="-159.3" font-family="Times,serif" font-size="14.00">sensor_id : bigint</text>
  141. </g>
  142. <!-- sensor&#45;&gt;phenomenon -->
  143. <g id="edge5" class="edge">
  144. <title>sensor&#45;&gt;phenomenon</title>
  145. <path fill="none" stroke="#595959" d="M475.5,-151.34C475.5,-151.34 475.5,-109.57 475.5,-109.57"/>
  146. <polygon fill="#595959" stroke="#595959" points="479,-109.57 475.5,-99.57 472,-109.57 479,-109.57"/>
  147. <text text-anchor="middle" x="540.5" y="-121.8" font-family="Times,serif" font-size="14.00">phenomenon_id:id</text>
  148. </g>
  149. <!-- system_user -->
  150. <g id="node8" class="node">
  151. <title>system_user</title>
  152. <polygon fill="none" stroke="black" points="1245.5,-181.5 1245.5,-250.5 1379.5,-250.5 1379.5,-181.5 1245.5,-181.5"/>
  153. <text text-anchor="middle" x="1312.5" y="-235.3" font-family="Times,serif" font-size="14.00">system_user</text>
  154. <polyline fill="none" stroke="black" points="1245.5,-227.5 1379.5,-227.5 "/>
  155. <text text-anchor="start" x="1253.5" y="-212.3" font-family="Times,serif" font-size="14.00">name : text</text>
  156. <polyline fill="none" stroke="black" points="1245.5,-204.5 1379.5,-204.5 "/>
  157. <text text-anchor="start" x="1253.5" y="-189.3" font-family="Times,serif" font-size="14.00">user_id : integer</text>
  158. </g>
  159. <!-- unit_type -->
  160. <g id="node12" class="node">
  161. <title>unit_type</title>
  162. <polygon fill="none" stroke="black" points="612,-8 612,-92 803,-92 803,-8 612,-8"/>
  163. <text text-anchor="middle" x="707.5" y="-76.8" font-family="Times,serif" font-size="14.00">unit_type</text>
  164. <polyline fill="none" stroke="black" points="612,-69 803,-69 "/>
  165. <text text-anchor="start" x="620" y="-53.8" font-family="Times,serif" font-size="14.00">name : varchar(20)</text>
  166. <text text-anchor="start" x="620" y="-38.8" font-family="Times,serif" font-size="14.00"> description : text</text>
  167. <polyline fill="none" stroke="black" points="612,-31 803,-31 "/>
  168. <text text-anchor="start" x="620" y="-15.8" font-family="Times,serif" font-size="14.00">unit_type_id : varchar(2)</text>
  169. </g>
  170. <!-- unit&#45;&gt;unit_type -->
  171. <g id="edge6" class="edge">
  172. <title>unit&#45;&gt;unit_type</title>
  173. <path fill="none" stroke="#595959" d="M707.5,-151.34C707.5,-151.34 707.5,-102.24 707.5,-102.24"/>
  174. <polygon fill="#595959" stroke="#595959" points="711,-102.24 707.5,-92.24 704,-102.24 711,-102.24"/>
  175. <text text-anchor="middle" x="751.5" y="-121.8" font-family="Times,serif" font-size="14.00">unit_type_id</text>
  176. </g>
  177. <!-- unit_to_campaign -->
  178. <g id="node10" class="node">
  179. <title>unit_to_campaign</title>
  180. <polygon fill="none" stroke="black" points="903.5,-347.5 903.5,-461.5 1197.5,-461.5 1197.5,-347.5 903.5,-347.5"/>
  181. <text text-anchor="middle" x="1050.5" y="-446.3" font-family="Times,serif" font-size="14.00">unit_to_campaign</text>
  182. <polyline fill="none" stroke="black" points="903.5,-438.5 1197.5,-438.5 "/>
  183. <text text-anchor="start" x="911.5" y="-423.3" font-family="Times,serif" font-size="14.00">campaign_id : integer</text>
  184. <text text-anchor="start" x="911.5" y="-408.3" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
  185. <text text-anchor="start" x="911.5" y="-393.3" font-family="Times,serif" font-size="14.00"> from_time : timestamp with time zone</text>
  186. <text text-anchor="start" x="911.5" y="-378.3" font-family="Times,serif" font-size="14.00"> to_time : timestamp with time zone</text>
  187. <polyline fill="none" stroke="black" points="903.5,-370.5 1197.5,-370.5 "/>
  188. <text text-anchor="start" x="911.5" y="-355.3" font-family="Times,serif" font-size="14.00">id : integer</text>
  189. </g>
  190. <!-- unit_to_campaign&#45;&gt;campaign -->
  191. <g id="edge7" class="edge">
  192. <title>unit_to_campaign&#45;&gt;campaign</title>
  193. <path fill="none" stroke="#595959" d="M1058,-347.43C1058,-347.43 1058,-283.2 1058,-283.2"/>
  194. <polygon fill="#595959" stroke="#595959" points="1061.5,-283.2 1058,-273.2 1054.5,-283.2 1061.5,-283.2"/>
  195. <text text-anchor="middle" x="1104.5" y="-302.8" font-family="Times,serif" font-size="14.00">campaign_id:id</text>
  196. </g>
  197. <!-- unit_to_campaign&#45;&gt;unit -->
  198. <g id="edge8" class="edge">
  199. <title>unit_to_campaign&#45;&gt;unit</title>
  200. <path fill="none" stroke="#595959" d="M911,-347.46C911,-313.52 911,-277 911,-277 911,-277 815.67,-277 815.67,-277"/>
  201. <polygon fill="#595959" stroke="#595959" points="815.67,-273.5 805.67,-277 815.67,-280.5 815.67,-273.5"/>
  202. <text text-anchor="middle" x="912" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
  203. </g>
  204. <!-- unit_to_sensor -->
  205. <g id="node11" class="node">
  206. <title>unit_to_sensor</title>
  207. <polygon fill="none" stroke="black" points="405.5,-374 405.5,-435 545.5,-435 545.5,-374 405.5,-374"/>
  208. <text text-anchor="middle" x="475.5" y="-419.8" font-family="Times,serif" font-size="14.00">unit_to_sensor</text>
  209. <polyline fill="none" stroke="black" points="405.5,-412 545.5,-412 "/>
  210. <text text-anchor="start" x="413.5" y="-396.8" font-family="Times,serif" font-size="14.00">sensor_id : bigint</text>
  211. <text text-anchor="start" x="413.5" y="-381.8" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
  212. </g>
  213. <!-- unit_to_sensor&#45;&gt;sensor -->
  214. <g id="edge9" class="edge">
  215. <title>unit_to_sensor&#45;&gt;sensor</title>
  216. <path fill="none" stroke="#595959" d="M452.17,-373.79C452.17,-373.79 452.17,-290.69 452.17,-290.69"/>
  217. <polygon fill="#595959" stroke="#595959" points="455.67,-290.69 452.17,-280.69 448.67,-290.69 455.67,-290.69"/>
  218. <text text-anchor="middle" x="509.5" y="-302.8" font-family="Times,serif" font-size="14.00">sensor_id</text>
  219. </g>
  220. <!-- unit_to_sensor&#45;&gt;unit -->
  221. <g id="edge10" class="edge">
  222. <title>unit_to_sensor&#45;&gt;unit</title>
  223. <path fill="none" stroke="#595959" d="M498.83,-373.95C498.83,-348.02 498.83,-315 498.83,-315 498.83,-315 707.5,-315 707.5,-315 707.5,-315 707.5,-290.65 707.5,-290.65"/>
  224. <polygon fill="#595959" stroke="#595959" points="711,-290.65 707.5,-280.65 704,-290.65 711,-290.65"/>
  225. <text text-anchor="middle" x="634" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
  226. </g>
  227. <!-- user_to_campaign -->
  228. <g id="node13" class="node">
  229. <title>user_to_campaign</title>
  230. <polygon fill="none" stroke="black" points="1220.5,-374 1220.5,-435 1396.5,-435 1396.5,-374 1220.5,-374"/>
  231. <text text-anchor="middle" x="1308.5" y="-419.8" font-family="Times,serif" font-size="14.00">user_to_campaign</text>
  232. <polyline fill="none" stroke="black" points="1220.5,-412 1396.5,-412 "/>
  233. <text text-anchor="start" x="1228.5" y="-396.8" font-family="Times,serif" font-size="14.00">user_id : integer</text>
  234. <text text-anchor="start" x="1228.5" y="-381.8" font-family="Times,serif" font-size="14.00"> campaign_id : integer</text>
  235. </g>
  236. <!-- user_to_campaign&#45;&gt;campaign -->
  237. <g id="edge11" class="edge">
  238. <title>user_to_campaign&#45;&gt;campaign</title>
  239. <path fill="none" stroke="#595959" d="M1233,-373.93C1233,-332.06 1233,-262 1233,-262 1233,-262 1222.8,-262 1222.8,-262"/>
  240. <polygon fill="#595959" stroke="#595959" points="1222.8,-258.5 1212.8,-262 1222.8,-265.5 1222.8,-258.5"/>
  241. <text text-anchor="middle" x="1235.5" y="-302.8" font-family="Times,serif" font-size="14.00">campaign_id:id</text>
  242. </g>
  243. <!-- user_to_campaign&#45;&gt;system_user -->
  244. <g id="edge12" class="edge">
  245. <title>user_to_campaign&#45;&gt;system_user</title>
  246. <path fill="none" stroke="#595959" d="M1312.5,-373.79C1312.5,-373.79 1312.5,-260.53 1312.5,-260.53"/>
  247. <polygon fill="#595959" stroke="#595959" points="1316,-260.53 1312.5,-250.53 1309,-260.53 1316,-260.53"/>
  248. <text text-anchor="middle" x="1338.5" y="-302.8" font-family="Times,serif" font-size="14.00">user_id</text>
  249. </g>
  250. </g>
  251. </svg>