1 {
2 "namespaces": [
3 "public"
4 ],
5 "name": "public",
6 "tables": [
7 {
8 "columns": {
9 "id": {
10 "name": "id",
11 "type": "text",
12 "unsigned": false,
13 "autoincrement": false,
14 "primary": true,
15 "nullable": false,
16 "unique": false,
17 "length": null,
18 "precision": null,
19 "scale": null,
20 "default": null,
21 "comment": null,
22 "enumItems": [],
23 "mappedType": "text"
24 },
25 "sku": {
26 "name": "sku",
27 "type": "text",
28 "unsigned": false,
29 "autoincrement": false,
30 "primary": false,
31 "nullable": true,
32 "unique": false,
33 "length": null,
34 "precision": null,
35 "scale": null,
36 "default": null,
37 "comment": null,
38 "enumItems": [],
39 "mappedType": "text"
40 },
41 "origin_country": {
42 "name": "origin_country",
43 "type": "text",
44 "unsigned": false,
45 "autoincrement": false,
46 "primary": false,
47 "nullable": true,
48 "unique": false,
49 "length": null,
50 "precision": null,
51 "scale": null,
52 "default": null,
53 "comment": null,
54 "enumItems": [],
55 "mappedType": "text"
56 },
57 "hs_code": {
58 "name": "hs_code",
59 "type": "text",
60 "unsigned": false,
61 "autoincrement": false,
62 "primary": false,
63 "nullable": true,
64 "unique": false,
65 "length": null,
66 "precision": null,
67 "scale": null,
68 "default": null,
69 "comment": null,
70 "enumItems": [],
71 "mappedType": "text"
72 },
73 "mid_code": {
74 "name": "mid_code",
75 "type": "text",
76 "unsigned": false,
77 "autoincrement": false,
78 "primary": false,
79 "nullable": true,
80 "unique": false,
81 "length": null,
82 "precision": null,
83 "scale": null,
84 "default": null,
85 "comment": null,
86 "enumItems": [],
87 "mappedType": "text"
88 },
89 "material": {
90 "name": "material",
91 "type": "text",
92 "unsigned": false,
93 "autoincrement": false,
94 "primary": false,
95 "nullable": true,
96 "unique": false,
97 "length": null,
98 "precision": null,
99 "scale": null,
100 "default": null,
101 "comment": null,
102 "enumItems": [],
103 "mappedType": "text"
104 },
105 "unit_of_measure": {
106 "name": "unit_of_measure",
107 "type": "text",
108 "unsigned": false,
109 "autoincrement": false,
110 "primary": false,
111 "nullable": true,
112 "unique": false,
113 "length": null,
114 "precision": null,
115 "scale": null,
116 "default": null,
117 "comment": null,
118 "enumItems": [],
119 "mappedType": "text"
120 },
121 "weight": {
122 "name": "weight",
123 "type": "integer",
124 "unsigned": false,
125 "autoincrement": false,
126 "primary": false,
127 "nullable": true,
128 "unique": false,
129 "length": null,
130 "precision": null,
131 "scale": null,
132 "default": null,
133 "comment": null,
134 "enumItems": [],
135 "mappedType": "integer"
136 },
137 "length": {
138 "name": "length",
139 "type": "integer",
140 "unsigned": false,
141 "autoincrement": false,
142 "primary": false,
143 "nullable": true,
144 "unique": false,
145 "length": null,
146 "precision": null,
147 "scale": null,
148 "default": null,
149 "comment": null,
150 "enumItems": [],
151 "mappedType": "integer"
152 },
153 "height": {
154 "name": "height",
155 "type": "integer",
156 "unsigned": false,
157 "autoincrement": false,
158 "primary": false,
159 "nullable": true,
160 "unique": false,
161 "length": null,
162 "precision": null,
163 "scale": null,
164 "default": null,
165 "comment": null,
166 "enumItems": [],
167 "mappedType": "integer"
168 },
169 "width": {
170 "name": "width",
171 "type": "integer",
172 "unsigned": false,
173 "autoincrement": false,
174 "primary": false,
175 "nullable": true,
176 "unique": false,
177 "length": null,
178 "precision": null,
179 "scale": null,
180 "default": null,
181 "comment": null,
182 "enumItems": [],
183 "mappedType": "integer"
184 },
185 "requires_shipping": {
186 "name": "requires_shipping",
187 "type": "boolean",
188 "unsigned": false,
189 "autoincrement": false,
190 "primary": false,
191 "nullable": false,
192 "unique": false,
193 "length": null,
194 "precision": null,
195 "scale": null,
196 "default": "true",
197 "comment": null,
198 "enumItems": [],
199 "mappedType": "boolean"
200 },
201 "description": {
202 "name": "description",
203 "type": "text",
204 "unsigned": false,
205 "autoincrement": false,
206 "primary": false,
207 "nullable": true,
208 "unique": false,
209 "length": null,
210 "precision": null,
211 "scale": null,
212 "default": null,
213 "comment": null,
214 "enumItems": [],
215 "mappedType": "text"
216 },
217 "title": {
218 "name": "title",
219 "type": "text",
220 "unsigned": false,
221 "autoincrement": false,
222 "primary": false,
223 "nullable": true,
224 "unique": false,
225 "length": null,
226 "precision": null,
227 "scale": null,
228 "default": null,
229 "comment": null,
230 "enumItems": [],
231 "mappedType": "text"
232 },
233 "thumbnail": {
234 "name": "thumbnail",
235 "type": "text",
236 "unsigned": false,
237 "autoincrement": false,
238 "primary": false,
239 "nullable": true,
240 "unique": false,
241 "length": null,
242 "precision": null,
243 "scale": null,
244 "default": null,
245 "comment": null,
246 "enumItems": [],
247 "mappedType": "text"
248 },
249 "metadata": {
250 "name": "metadata",
251 "type": "jsonb",
252 "unsigned": false,
253 "autoincrement": false,
254 "primary": false,
255 "nullable": true,
256 "unique": false,
257 "length": null,
258 "precision": null,
259 "scale": null,
260 "default": null,
261 "comment": null,
262 "enumItems": [],
263 "mappedType": "json"
264 },
265 "created_at": {
266 "name": "created_at",
267 "type": "timestamptz",
268 "unsigned": false,
269 "autoincrement": false,
270 "primary": false,
271 "nullable": false,
272 "unique": false,
273 "length": 6,
274 "precision": null,
275 "scale": null,
276 "default": "now()",
277 "comment": null,
278 "enumItems": [],
279 "mappedType": "datetime"
280 },
281 "updated_at": {
282 "name": "updated_at",
283 "type": "timestamptz",
284 "unsigned": false,
285 "autoincrement": false,
286 "primary": false,
287 "nullable": false,
288 "unique": false,
289 "length": 6,
290 "precision": null,
291 "scale": null,
292 "default": "now()",
293 "comment": null,
294 "enumItems": [],
295 "mappedType": "datetime"
296 },
297 "deleted_at": {
298 "name": "deleted_at",
299 "type": "timestamptz",
300 "unsigned": false,
301 "autoincrement": false,
302 "primary": false,
303 "nullable": true,
304 "unique": false,
305 "length": 6,
306 "precision": null,
307 "scale": null,
308 "default": null,
309 "comment": null,
310 "enumItems": [],
311 "mappedType": "datetime"
312 }
313 },
314 "name": "inventory_item",
315 "schema": "public",
316 "indexes": [
317 {
318 "keyName": "IDX_inventory_item_deleted_at",
319 "columnNames": [],
320 "composite": false,
321 "constraint": false,
322 "primary": false,
323 "unique": false,
324 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_inventory_item_deleted_at\" ON \"inventory_item\" (\"deleted_at\") WHERE deleted_at IS NULL"
325 },
326 {
327 "keyName": "IDX_inventory_item_sku",
328 "columnNames": [],
329 "composite": false,
330 "constraint": false,
331 "primary": false,
332 "unique": false,
333 "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_inventory_item_sku\" ON \"inventory_item\" (\"sku\") WHERE deleted_at IS NULL"
334 },
335 {
336 "keyName": "inventory_item_pkey",
337 "columnNames": [
338 "id"
339 ],
340 "composite": false,
341 "constraint": true,
342 "primary": true,
343 "unique": true
344 }
345 ],
346 "checks": [],
347 "foreignKeys": {},
348 "nativeEnums": {}
349 },
350 {
351 "columns": {
352 "id": {
353 "name": "id",
354 "type": "text",
355 "unsigned": false,
356 "autoincrement": false,
357 "primary": true,
358 "nullable": false,
359 "unique": false,
360 "length": null,
361 "precision": null,
362 "scale": null,
363 "default": null,
364 "comment": null,
365 "enumItems": [],
366 "mappedType": "text"
367 },
368 "location_id": {
369 "name": "location_id",
370 "type": "text",
371 "unsigned": false,
372 "autoincrement": false,
373 "primary": false,
374 "nullable": false,
375 "unique": false,
376 "length": null,
377 "precision": null,
378 "scale": null,
379 "default": null,
380 "comment": null,
381 "enumItems": [],
382 "mappedType": "text"
383 },
384 "stocked_quantity": {
385 "name": "stocked_quantity",
386 "type": "numeric",
387 "unsigned": false,
388 "autoincrement": false,
389 "primary": false,
390 "nullable": false,
391 "unique": false,
392 "length": null,
393 "precision": null,
394 "scale": null,
395 "default": "0",
396 "comment": null,
397 "enumItems": [],
398 "mappedType": "decimal"
399 },
400 "reserved_quantity": {
401 "name": "reserved_quantity",
402 "type": "numeric",
403 "unsigned": false,
404 "autoincrement": false,
405 "primary": false,
406 "nullable": false,
407 "unique": false,
408 "length": null,
409 "precision": null,
410 "scale": null,
411 "default": "0",
412 "comment": null,
413 "enumItems": [],
414 "mappedType": "decimal"
415 },
416 "incoming_quantity": {
417 "name": "incoming_quantity",
418 "type": "numeric",
419 "unsigned": false,
420 "autoincrement": false,
421 "primary": false,
422 "nullable": false,
423 "unique": false,
424 "length": null,
425 "precision": null,
426 "scale": null,
427 "default": "0",
428 "comment": null,
429 "enumItems": [],
430 "mappedType": "decimal"
431 },
432 "metadata": {
433 "name": "metadata",
434 "type": "jsonb",
435 "unsigned": false,
436 "autoincrement": false,
437 "primary": false,
438 "nullable": true,
439 "unique": false,
440 "length": null,
441 "precision": null,
442 "scale": null,
443 "default": null,
444 "comment": null,
445 "enumItems": [],
446 "mappedType": "json"
447 },
448 "inventory_item_id": {
449 "name": "inventory_item_id",
450 "type": "text",
451 "unsigned": false,
452 "autoincrement": false,
453 "primary": false,
454 "nullable": false,
455 "unique": false,
456 "length": null,
457 "precision": null,
458 "scale": null,
459 "default": null,
460 "comment": null,
461 "enumItems": [],
462 "mappedType": "text"
463 },
464 "raw_stocked_quantity": {
465 "name": "raw_stocked_quantity",
466 "type": "jsonb",
467 "unsigned": false,
468 "autoincrement": false,
469 "primary": false,
470 "nullable": false,
471 "unique": false,
472 "length": null,
473 "precision": null,
474 "scale": null,
475 "default": "'{\"value\":\"0\",\"precision\":20}'",
476 "comment": null,
477 "enumItems": [],
478 "mappedType": "json"
479 },
480 "raw_reserved_quantity": {
481 "name": "raw_reserved_quantity",
482 "type": "jsonb",
483 "unsigned": false,
484 "autoincrement": false,
485 "primary": false,
486 "nullable": false,
487 "unique": false,
488 "length": null,
489 "precision": null,
490 "scale": null,
491 "default": "'{\"value\":\"0\",\"precision\":20}'",
492 "comment": null,
493 "enumItems": [],
494 "mappedType": "json"
495 },
496 "raw_incoming_quantity": {
497 "name": "raw_incoming_quantity",
498 "type": "jsonb",
499 "unsigned": false,
500 "autoincrement": false,
501 "primary": false,
502 "nullable": false,
503 "unique": false,
504 "length": null,
505 "precision": null,
506 "scale": null,
507 "default": "'{\"value\":\"0\",\"precision\":20}'",
508 "comment": null,
509 "enumItems": [],
510 "mappedType": "json"
511 },
512 "created_at": {
513 "name": "created_at",
514 "type": "timestamptz",
515 "unsigned": false,
516 "autoincrement": false,
517 "primary": false,
518 "nullable": false,
519 "unique": false,
520 "length": 6,
521 "precision": null,
522 "scale": null,
523 "default": "now()",
524 "comment": null,
525 "enumItems": [],
526 "mappedType": "datetime"
527 },
528 "updated_at": {
529 "name": "updated_at",
530 "type": "timestamptz",
531 "unsigned": false,
532 "autoincrement": false,
533 "primary": false,
534 "nullable": false,
535 "unique": false,
536 "length": 6,
537 "precision": null,
538 "scale": null,
539 "default": "now()",
540 "comment": null,
541 "enumItems": [],
542 "mappedType": "datetime"
543 },
544 "deleted_at": {
545 "name": "deleted_at",
546 "type": "timestamptz",
547 "unsigned": false,
548 "autoincrement": false,
549 "primary": false,
550 "nullable": true,
551 "unique": false,
552 "length": 6,
553 "precision": null,
554 "scale": null,
555 "default": null,
556 "comment": null,
557 "enumItems": [],
558 "mappedType": "datetime"
559 }
560 },
561 "name": "inventory_level",
562 "schema": "public",
563 "indexes": [
564 {
565 "keyName": "IDX_inventory_level_inventory_item_id",
566 "columnNames": [],
567 "composite": false,
568 "constraint": false,
569 "primary": false,
570 "unique": false,
571 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_inventory_level_inventory_item_id\" ON \"inventory_level\" (\"inventory_item_id\") WHERE deleted_at IS NULL"
572 },
573 {
574 "keyName": "IDX_inventory_level_deleted_at",
575 "columnNames": [],
576 "composite": false,
577 "constraint": false,
578 "primary": false,
579 "unique": false,
580 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_inventory_level_deleted_at\" ON \"inventory_level\" (\"deleted_at\") WHERE deleted_at IS NULL"
581 },
582 {
583 "keyName": "IDX_inventory_level_location_id",
584 "columnNames": [],
585 "composite": false,
586 "constraint": false,
587 "primary": false,
588 "unique": false,
589 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_inventory_level_location_id\" ON \"inventory_level\" (\"location_id\") WHERE deleted_at IS NULL"
590 },
591 {
592 "keyName": "IDX_inventory_level_location_id_inventory_item_id",
593 "columnNames": [],
594 "composite": false,
595 "constraint": false,
596 "primary": false,
597 "unique": false,
598 "expression": "CREATE UNIQUE INDEX IF NOT EXISTS \"IDX_inventory_level_location_id_inventory_item_id\" ON \"inventory_level\" (\"inventory_item_id\", \"location_id\") WHERE deleted_at IS NULL"
599 },
600 {
601 "keyName": "inventory_level_pkey",
602 "columnNames": [
603 "id"
604 ],
605 "composite": false,
606 "constraint": true,
607 "primary": true,
608 "unique": true
609 }
610 ],
611 "checks": [],
612 "foreignKeys": {
613 "inventory_level_inventory_item_id_foreign": {
614 "constraintName": "inventory_level_inventory_item_id_foreign",
615 "columnNames": [
616 "inventory_item_id"
617 ],
618 "localTableName": "public.inventory_level",
619 "referencedColumnNames": [
620 "id"
621 ],
622 "referencedTableName": "public.inventory_item",
623 "deleteRule": "cascade",
624 "updateRule": "cascade"
625 }
626 },
627 "nativeEnums": {}
628 },
629 {
630 "columns": {
631 "id": {
632 "name": "id",
633 "type": "text",
634 "unsigned": false,
635 "autoincrement": false,
636 "primary": true,
637 "nullable": false,
638 "unique": false,
639 "length": null,
640 "precision": null,
641 "scale": null,
642 "default": null,
643 "comment": null,
644 "enumItems": [],
645 "mappedType": "text"
646 },
647 "line_item_id": {
648 "name": "line_item_id",
649 "type": "text",
650 "unsigned": false,
651 "autoincrement": false,
652 "primary": false,
653 "nullable": true,
654 "unique": false,
655 "length": null,
656 "precision": null,
657 "scale": null,
658 "default": null,
659 "comment": null,
660 "enumItems": [],
661 "mappedType": "text"
662 },
663 "allow_backorder": {
664 "name": "allow_backorder",
665 "type": "boolean",
666 "unsigned": false,
667 "autoincrement": false,
668 "primary": false,
669 "nullable": false,
670 "unique": false,
671 "length": null,
672 "precision": null,
673 "scale": null,
674 "default": "false",
675 "comment": null,
676 "enumItems": [],
677 "mappedType": "boolean"
678 },
679 "location_id": {
680 "name": "location_id",
681 "type": "text",
682 "unsigned": false,
683 "autoincrement": false,
684 "primary": false,
685 "nullable": false,
686 "unique": false,
687 "length": null,
688 "precision": null,
689 "scale": null,
690 "default": null,
691 "comment": null,
692 "enumItems": [],
693 "mappedType": "text"
694 },
695 "quantity": {
696 "name": "quantity",
697 "type": "numeric",
698 "unsigned": false,
699 "autoincrement": false,
700 "primary": false,
701 "nullable": false,
702 "unique": false,
703 "length": null,
704 "precision": null,
705 "scale": null,
706 "default": null,
707 "comment": null,
708 "enumItems": [],
709 "mappedType": "decimal"
710 },
711 "raw_quantity": {
712 "name": "raw_quantity",
713 "type": "jsonb",
714 "unsigned": false,
715 "autoincrement": false,
716 "primary": false,
717 "nullable": false,
718 "unique": false,
719 "length": null,
720 "precision": null,
721 "scale": null,
722 "default": null,
723 "comment": null,
724 "enumItems": [],
725 "mappedType": "json"
726 },
727 "external_id": {
728 "name": "external_id",
729 "type": "text",
730 "unsigned": false,
731 "autoincrement": false,
732 "primary": false,
733 "nullable": true,
734 "unique": false,
735 "length": null,
736 "precision": null,
737 "scale": null,
738 "default": null,
739 "comment": null,
740 "enumItems": [],
741 "mappedType": "text"
742 },
743 "description": {
744 "name": "description",
745 "type": "text",
746 "unsigned": false,
747 "autoincrement": false,
748 "primary": false,
749 "nullable": true,
750 "unique": false,
751 "length": null,
752 "precision": null,
753 "scale": null,
754 "default": null,
755 "comment": null,
756 "enumItems": [],
757 "mappedType": "text"
758 },
759 "created_by": {
760 "name": "created_by",
761 "type": "text",
762 "unsigned": false,
763 "autoincrement": false,
764 "primary": false,
765 "nullable": true,
766 "unique": false,
767 "length": null,
768 "precision": null,
769 "scale": null,
770 "default": null,
771 "comment": null,
772 "enumItems": [],
773 "mappedType": "text"
774 },
775 "metadata": {
776 "name": "metadata",
777 "type": "jsonb",
778 "unsigned": false,
779 "autoincrement": false,
780 "primary": false,
781 "nullable": true,
782 "unique": false,
783 "length": null,
784 "precision": null,
785 "scale": null,
786 "default": null,
787 "comment": null,
788 "enumItems": [],
789 "mappedType": "json"
790 },
791 "inventory_item_id": {
792 "name": "inventory_item_id",
793 "type": "text",
794 "unsigned": false,
795 "autoincrement": false,
796 "primary": false,
797 "nullable": false,
798 "unique": false,
799 "length": null,
800 "precision": null,
801 "scale": null,
802 "default": null,
803 "comment": null,
804 "enumItems": [],
805 "mappedType": "text"
806 },
807 "created_at": {
808 "name": "created_at",
809 "type": "timestamptz",
810 "unsigned": false,
811 "autoincrement": false,
812 "primary": false,
813 "nullable": false,
814 "unique": false,
815 "length": 6,
816 "precision": null,
817 "scale": null,
818 "default": "now()",
819 "comment": null,
820 "enumItems": [],
821 "mappedType": "datetime"
822 },
823 "updated_at": {
824 "name": "updated_at",
825 "type": "timestamptz",
826 "unsigned": false,
827 "autoincrement": false,
828 "primary": false,
829 "nullable": false,
830 "unique": false,
831 "length": 6,
832 "precision": null,
833 "scale": null,
834 "default": "now()",
835 "comment": null,
836 "enumItems": [],
837 "mappedType": "datetime"
838 },
839 "deleted_at": {
840 "name": "deleted_at",
841 "type": "timestamptz",
842 "unsigned": false,
843 "autoincrement": false,
844 "primary": false,
845 "nullable": true,
846 "unique": false,
847 "length": 6,
848 "precision": null,
849 "scale": null,
850 "default": null,
851 "comment": null,
852 "enumItems": [],
853 "mappedType": "datetime"
854 }
855 },
856 "name": "reservation_item",
857 "schema": "public",
858 "indexes": [
859 {
860 "keyName": "IDX_reservation_item_inventory_item_id",
861 "columnNames": [],
862 "composite": false,
863 "constraint": false,
864 "primary": false,
865 "unique": false,
866 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_reservation_item_inventory_item_id\" ON \"reservation_item\" (\"inventory_item_id\") WHERE deleted_at IS NULL"
867 },
868 {
869 "keyName": "IDX_reservation_item_deleted_at",
870 "columnNames": [],
871 "composite": false,
872 "constraint": false,
873 "primary": false,
874 "unique": false,
875 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_reservation_item_deleted_at\" ON \"reservation_item\" (\"deleted_at\") WHERE deleted_at IS NULL"
876 },
877 {
878 "keyName": "IDX_reservation_item_line_item_id",
879 "columnNames": [],
880 "composite": false,
881 "constraint": false,
882 "primary": false,
883 "unique": false,
884 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_reservation_item_line_item_id\" ON \"reservation_item\" (\"line_item_id\") WHERE deleted_at IS NULL"
885 },
886 {
887 "keyName": "IDX_reservation_item_location_id",
888 "columnNames": [],
889 "composite": false,
890 "constraint": false,
891 "primary": false,
892 "unique": false,
893 "expression": "CREATE INDEX IF NOT EXISTS \"IDX_reservation_item_location_id\" ON \"reservation_item\" (\"location_id\") WHERE deleted_at IS NULL"
894 },
895 {
896 "keyName": "reservation_item_pkey",
897 "columnNames": [
898 "id"
899 ],
900 "composite": false,
901 "constraint": true,
902 "primary": true,
903 "unique": true
904 }
905 ],
906 "checks": [],
907 "foreignKeys": {
908 "reservation_item_inventory_item_id_foreign": {
909 "constraintName": "reservation_item_inventory_item_id_foreign",
910 "columnNames": [
911 "inventory_item_id"
912 ],
913 "localTableName": "public.reservation_item",
914 "referencedColumnNames": [
915 "id"
916 ],
917 "referencedTableName": "public.inventory_item",
918 "deleteRule": "cascade",
919 "updateRule": "cascade"
920 }
921 },
922 "nativeEnums": {}
923 }
924 ],
925 "nativeEnums": {}
926 }