data.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. const data = {
  2. entities: [
  3. {
  4. "id": "default.inventory",
  5. "type": "TABLE",
  6. "database": "default",
  7. "name": "inventory",
  8. "columns": [
  9. {
  10. "id": "default.inventory.id",
  11. "type": "COLUMN",
  12. "tableId": "default.inventory",
  13. "name": "id"
  14. },
  15. {
  16. "id": "default.inventory.quantity",
  17. "type": "COLUMN",
  18. "tableId": "default.inventory",
  19. "name": "quantity"
  20. },
  21. {
  22. "id": "default.inventory.product_id",
  23. "type": "COLUMN",
  24. "tableId": "default.inventory",
  25. "name": "product_id"
  26. },
  27. {
  28. "id": "default.inventory.vendor_id",
  29. "type": "COLUMN",
  30. "tableId": "default.inventory",
  31. "name": "vendor_id"
  32. }
  33. ]
  34. },
  35. {
  36. "id": "market.products",
  37. "type": "TABLE",
  38. "database": "market",
  39. "name": "products",
  40. "columns": [
  41. {
  42. "id": "market.products.id",
  43. "type": "COLUMN",
  44. "tableId": "market.products",
  45. "name": "id"
  46. },
  47. {
  48. "id": "market.products.name",
  49. "type": "COLUMN",
  50. "tableId": "market.products",
  51. "name": "name"
  52. },
  53. {
  54. "id": "market.products.description",
  55. "type": "COLUMN",
  56. "tableId": "market.products",
  57. "name": "description"
  58. },
  59. {
  60. "id": "market.products.category_id",
  61. "type": "COLUMN",
  62. "tableId": "market.products",
  63. "name": "category_id"
  64. }
  65. ]
  66. },
  67. {
  68. "id": "market.vendors",
  69. "type": "TABLE",
  70. "database": "market",
  71. "name": "vendors",
  72. "columns": [
  73. {
  74. "id": "market.vendors.id",
  75. "type": "COLUMN",
  76. "tableId": "market.vendors",
  77. "name": "id"
  78. },
  79. {
  80. "id": "market.vendors.name",
  81. "type": "COLUMN",
  82. "tableId": "market.vendors",
  83. "name": "name"
  84. }
  85. ]
  86. },
  87. {
  88. "id": "market.product_categories",
  89. "type": "TABLE",
  90. "database": "market",
  91. "name": "product_categories",
  92. "columns": [
  93. {
  94. "id": "market.product_categories.id",
  95. "type": "COLUMN",
  96. "tableId": "market.product_categories",
  97. "name": "id"
  98. },
  99. {
  100. "id": "market.product_categories.name",
  101. "type": "COLUMN",
  102. "tableId": "market.product_categories",
  103. "name": "name"
  104. },
  105. {
  106. "id": "market.product_categories.description",
  107. "type": "COLUMN",
  108. "tableId": "market.product_categories",
  109. "name": "description"
  110. }
  111. ]
  112. },
  113. {
  114. "id": "Laptop",
  115. "type": "LITERAL",
  116. "value": "Laptop"
  117. },
  118. {
  119. "id": "Apple",
  120. "type": "LITERAL",
  121. "value": "Apple"
  122. }
  123. ],
  124. relations: [
  125. {
  126. "desc": "Foreign Key",
  127. "left": {
  128. "id": "default.inventory.product_id",
  129. "type": "COLUMN",
  130. "tableId": "default.inventory",
  131. "name": "product_id"
  132. },
  133. "right": {
  134. "id": "market.products.id",
  135. "type": "COLUMN",
  136. "tableId": "market.products",
  137. "name": "id"
  138. }
  139. },
  140. {
  141. "desc": "Foreign Key",
  142. "left": {
  143. "id": "default.inventory.vendor_id",
  144. "type": "COLUMN",
  145. "tableId": "default.inventory",
  146. "name": "vendor_id"
  147. },
  148. "right": {
  149. "id": "market.vendors.id",
  150. "type": "COLUMN",
  151. "tableId": "market.vendors",
  152. "name": "id"
  153. }
  154. },
  155. {
  156. "desc": "Foreign Key",
  157. "left": {
  158. "id": "market.products.category_id",
  159. "type": "COLUMN",
  160. "tableId": "market.products",
  161. "name": "category_id"
  162. },
  163. "right": {
  164. "id": "market.product_categories.id",
  165. "type": "COLUMN",
  166. "tableId": "market.product_categories",
  167. "name": "id"
  168. }
  169. },
  170. {
  171. "desc": "Foreign Key",
  172. "left": {
  173. "id": "market.product_categories.name",
  174. "type": "COLUMN",
  175. "tableId": "market.product_categories",
  176. "name": "name"
  177. },
  178. "right": {
  179. "id": "Laptop",
  180. "type": "LITERAL",
  181. "value": "Laptop"
  182. }
  183. },
  184. {
  185. "desc": "Foreign Key",
  186. "left": {
  187. "id": "market.vendors.name",
  188. "type": "COLUMN",
  189. "tableId": "market.vendors",
  190. "name": "name"
  191. },
  192. "right": {
  193. "id": "Apple",
  194. "type": "LITERAL",
  195. "value": "Apple"
  196. }
  197. }
  198. ]
  199. };