@happyvertical/smrt-products 0.49.3 → 0.49.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/chunks/__smrt-register__-fIfNrtEd.js +6 -0
- package/dist/lib/chunks/__smrt-register__-fIfNrtEd.js.map +1 -0
- package/dist/lib/chunks/{collections-Ds6tJwHX.js → collections-BXpftYa8.js} +2 -2
- package/dist/lib/chunks/{collections-Ds6tJwHX.js.map → collections-BXpftYa8.js.map} +1 -1
- package/dist/lib/chunks/{generated-DHDsh1bX.js → generated-wOQmGiWg.js} +2 -2
- package/dist/lib/chunks/{generated-DHDsh1bX.js.map → generated-wOQmGiWg.js.map} +1 -1
- package/dist/lib/chunks/models-BTpdH07s.js +2 -0
- package/dist/lib/collections.js +1 -1
- package/dist/lib/generated.js +1 -1
- package/dist/lib/index.js +4 -4
- package/dist/lib/manifest.json +405 -42
- package/dist/lib/models.js +1 -1
- package/dist/lib/smrt-knowledge.json +6 -6
- package/package.json +9 -9
- package/dist/lib/chunks/__smrt-register__-bRbes__H.js +0 -6
- package/dist/lib/chunks/__smrt-register__-bRbes__H.js.map +0 -1
- package/dist/lib/chunks/models-cEjoi9dW.js +0 -2
package/dist/lib/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-products",
|
|
5
|
-
"packageVersion": "0.49.
|
|
5
|
+
"packageVersion": "0.49.4",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-products:CategoryCollection": {
|
|
8
8
|
"name": "categorycollection",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"exportName": "CategoryCollection",
|
|
29
29
|
"collectionExportName": "CategoryCollectionCollection",
|
|
30
30
|
"schema": {
|
|
31
|
-
"tableName": "
|
|
32
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
31
|
+
"tableName": "categories",
|
|
32
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"categories\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"description\" TEXT,\n \"parent_id\" UUID,\n \"level\" INTEGER DEFAULT 0,\n \"product_count\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
33
33
|
"columns": {
|
|
34
34
|
"id": {
|
|
35
35
|
"type": "UUID",
|
|
@@ -46,6 +46,14 @@
|
|
|
46
46
|
"notNull": true,
|
|
47
47
|
"default": ""
|
|
48
48
|
},
|
|
49
|
+
"_meta_type": {
|
|
50
|
+
"type": "TEXT",
|
|
51
|
+
"notNull": true
|
|
52
|
+
},
|
|
53
|
+
"_meta_data": {
|
|
54
|
+
"type": "JSON",
|
|
55
|
+
"notNull": false
|
|
56
|
+
},
|
|
49
57
|
"created_at": {
|
|
50
58
|
"type": "TIMESTAMP",
|
|
51
59
|
"notNull": true,
|
|
@@ -55,25 +63,80 @@
|
|
|
55
63
|
"type": "TIMESTAMP",
|
|
56
64
|
"notNull": true,
|
|
57
65
|
"default": "current_timestamp"
|
|
66
|
+
},
|
|
67
|
+
"tenant_id": {
|
|
68
|
+
"type": "UUID",
|
|
69
|
+
"referenceKind": "tenantId",
|
|
70
|
+
"notNull": false
|
|
71
|
+
},
|
|
72
|
+
"name": {
|
|
73
|
+
"type": "TEXT",
|
|
74
|
+
"notNull": false
|
|
75
|
+
},
|
|
76
|
+
"description": {
|
|
77
|
+
"type": "TEXT",
|
|
78
|
+
"notNull": false
|
|
79
|
+
},
|
|
80
|
+
"parent_id": {
|
|
81
|
+
"type": "UUID",
|
|
82
|
+
"referenceKind": "foreignKey",
|
|
83
|
+
"notNull": false,
|
|
84
|
+
"foreignKey": {
|
|
85
|
+
"table": "categories",
|
|
86
|
+
"column": "id",
|
|
87
|
+
"onDelete": "NO ACTION",
|
|
88
|
+
"onUpdate": "CASCADE"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"level": {
|
|
92
|
+
"type": "INTEGER",
|
|
93
|
+
"notNull": false,
|
|
94
|
+
"default": 0
|
|
95
|
+
},
|
|
96
|
+
"product_count": {
|
|
97
|
+
"type": "INTEGER",
|
|
98
|
+
"notNull": false,
|
|
99
|
+
"default": 0
|
|
100
|
+
},
|
|
101
|
+
"active": {
|
|
102
|
+
"type": "BOOLEAN",
|
|
103
|
+
"notNull": false,
|
|
104
|
+
"default": true
|
|
58
105
|
}
|
|
59
106
|
},
|
|
60
107
|
"indexes": [
|
|
61
108
|
{
|
|
62
|
-
"name": "
|
|
109
|
+
"name": "categories_slug_context_meta_type_idx",
|
|
63
110
|
"columns": [
|
|
111
|
+
"tenant_id",
|
|
64
112
|
"slug",
|
|
65
|
-
"context"
|
|
113
|
+
"context",
|
|
114
|
+
"_meta_type"
|
|
66
115
|
],
|
|
67
|
-
"unique": true
|
|
116
|
+
"unique": true,
|
|
117
|
+
"nullsNotDistinct": true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "categories_meta_type_idx",
|
|
121
|
+
"columns": [
|
|
122
|
+
"_meta_type"
|
|
123
|
+
]
|
|
68
124
|
},
|
|
69
125
|
{
|
|
70
|
-
"name": "
|
|
126
|
+
"name": "categories_tenant_id_created_at_idx",
|
|
71
127
|
"columns": [
|
|
128
|
+
"tenant_id",
|
|
72
129
|
"created_at"
|
|
73
130
|
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "categories_parent_id_idx",
|
|
134
|
+
"columns": [
|
|
135
|
+
"parent_id"
|
|
136
|
+
]
|
|
74
137
|
}
|
|
75
138
|
],
|
|
76
|
-
"version": "
|
|
139
|
+
"version": "78838be9"
|
|
77
140
|
}
|
|
78
141
|
},
|
|
79
142
|
"@happyvertical/smrt-products:MaterialCollection": {
|
|
@@ -203,7 +266,7 @@
|
|
|
203
266
|
"collectionExportName": "MaterialCollectionCollection",
|
|
204
267
|
"schema": {
|
|
205
268
|
"tableName": "products",
|
|
206
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
269
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
|
|
207
270
|
"columns": {
|
|
208
271
|
"id": {
|
|
209
272
|
"type": "UUID",
|
|
@@ -220,6 +283,14 @@
|
|
|
220
283
|
"notNull": true,
|
|
221
284
|
"default": ""
|
|
222
285
|
},
|
|
286
|
+
"_meta_type": {
|
|
287
|
+
"type": "TEXT",
|
|
288
|
+
"notNull": true
|
|
289
|
+
},
|
|
290
|
+
"_meta_data": {
|
|
291
|
+
"type": "JSON",
|
|
292
|
+
"notNull": false
|
|
293
|
+
},
|
|
223
294
|
"created_at": {
|
|
224
295
|
"type": "TIMESTAMP",
|
|
225
296
|
"notNull": true,
|
|
@@ -229,25 +300,84 @@
|
|
|
229
300
|
"type": "TIMESTAMP",
|
|
230
301
|
"notNull": true,
|
|
231
302
|
"default": "current_timestamp"
|
|
303
|
+
},
|
|
304
|
+
"tenant_id": {
|
|
305
|
+
"type": "UUID",
|
|
306
|
+
"referenceKind": "tenantId",
|
|
307
|
+
"notNull": false
|
|
308
|
+
},
|
|
309
|
+
"product_type": {
|
|
310
|
+
"type": "TEXT",
|
|
311
|
+
"notNull": false
|
|
312
|
+
},
|
|
313
|
+
"name": {
|
|
314
|
+
"type": "TEXT",
|
|
315
|
+
"notNull": false
|
|
316
|
+
},
|
|
317
|
+
"description": {
|
|
318
|
+
"type": "TEXT",
|
|
319
|
+
"notNull": false
|
|
320
|
+
},
|
|
321
|
+
"category": {
|
|
322
|
+
"type": "TEXT",
|
|
323
|
+
"notNull": false
|
|
324
|
+
},
|
|
325
|
+
"manufacturer": {
|
|
326
|
+
"type": "TEXT",
|
|
327
|
+
"notNull": false
|
|
328
|
+
},
|
|
329
|
+
"model": {
|
|
330
|
+
"type": "TEXT",
|
|
331
|
+
"notNull": false
|
|
332
|
+
},
|
|
333
|
+
"price": {
|
|
334
|
+
"type": "INTEGER",
|
|
335
|
+
"notNull": false,
|
|
336
|
+
"default": 0
|
|
337
|
+
},
|
|
338
|
+
"in_stock": {
|
|
339
|
+
"type": "BOOLEAN",
|
|
340
|
+
"notNull": false,
|
|
341
|
+
"default": true
|
|
342
|
+
},
|
|
343
|
+
"specifications": {
|
|
344
|
+
"type": "JSON",
|
|
345
|
+
"notNull": false,
|
|
346
|
+
"default": {}
|
|
347
|
+
},
|
|
348
|
+
"tags": {
|
|
349
|
+
"type": "JSON",
|
|
350
|
+
"notNull": false,
|
|
351
|
+
"default": []
|
|
232
352
|
}
|
|
233
353
|
},
|
|
234
354
|
"indexes": [
|
|
235
355
|
{
|
|
236
|
-
"name": "
|
|
356
|
+
"name": "products_slug_context_meta_type_idx",
|
|
237
357
|
"columns": [
|
|
358
|
+
"tenant_id",
|
|
238
359
|
"slug",
|
|
239
|
-
"context"
|
|
360
|
+
"context",
|
|
361
|
+
"_meta_type"
|
|
240
362
|
],
|
|
241
|
-
"unique": true
|
|
363
|
+
"unique": true,
|
|
364
|
+
"nullsNotDistinct": true
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"name": "products_meta_type_idx",
|
|
368
|
+
"columns": [
|
|
369
|
+
"_meta_type"
|
|
370
|
+
]
|
|
242
371
|
},
|
|
243
372
|
{
|
|
244
|
-
"name": "
|
|
373
|
+
"name": "products_tenant_id_created_at_idx",
|
|
245
374
|
"columns": [
|
|
375
|
+
"tenant_id",
|
|
246
376
|
"created_at"
|
|
247
377
|
]
|
|
248
378
|
}
|
|
249
379
|
],
|
|
250
|
-
"version": "
|
|
380
|
+
"version": "a7b4d592"
|
|
251
381
|
}
|
|
252
382
|
},
|
|
253
383
|
"@happyvertical/smrt-products:ProductAssetCollection": {
|
|
@@ -455,7 +585,7 @@
|
|
|
455
585
|
"collectionExportName": "ProductAssetCollectionCollection",
|
|
456
586
|
"schema": {
|
|
457
587
|
"tableName": "product_assets",
|
|
458
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"product_assets\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
588
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"product_assets\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_id\" UUID NOT NULL,\n \"asset_id\" UUID NOT NULL,\n \"relationship\" TEXT NOT NULL,\n \"sort_order\" INTEGER NOT NULL DEFAULT 0\n);",
|
|
459
589
|
"columns": {
|
|
460
590
|
"id": {
|
|
461
591
|
"type": "UUID",
|
|
@@ -481,25 +611,77 @@
|
|
|
481
611
|
"type": "TIMESTAMP",
|
|
482
612
|
"notNull": true,
|
|
483
613
|
"default": "current_timestamp"
|
|
614
|
+
},
|
|
615
|
+
"tenant_id": {
|
|
616
|
+
"type": "UUID",
|
|
617
|
+
"referenceKind": "tenantId",
|
|
618
|
+
"notNull": false,
|
|
619
|
+
"unique": false
|
|
620
|
+
},
|
|
621
|
+
"product_id": {
|
|
622
|
+
"type": "UUID",
|
|
623
|
+
"referenceKind": "foreignKey",
|
|
624
|
+
"notNull": true,
|
|
625
|
+
"unique": false,
|
|
626
|
+
"foreignKey": {
|
|
627
|
+
"table": "products",
|
|
628
|
+
"column": "id",
|
|
629
|
+
"onDelete": "CASCADE",
|
|
630
|
+
"onUpdate": "CASCADE"
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
"asset_id": {
|
|
634
|
+
"type": "UUID",
|
|
635
|
+
"referenceKind": "crossPackageRef",
|
|
636
|
+
"notNull": true,
|
|
637
|
+
"unique": false
|
|
638
|
+
},
|
|
639
|
+
"relationship": {
|
|
640
|
+
"type": "TEXT",
|
|
641
|
+
"notNull": true,
|
|
642
|
+
"unique": false
|
|
643
|
+
},
|
|
644
|
+
"sort_order": {
|
|
645
|
+
"type": "INTEGER",
|
|
646
|
+
"notNull": true,
|
|
647
|
+
"unique": false,
|
|
648
|
+
"default": 0
|
|
484
649
|
}
|
|
485
650
|
},
|
|
486
651
|
"indexes": [
|
|
652
|
+
{
|
|
653
|
+
"name": "product_assets_product_id_asset_id_idx",
|
|
654
|
+
"columns": [
|
|
655
|
+
"product_id",
|
|
656
|
+
"asset_id",
|
|
657
|
+
"relationship",
|
|
658
|
+
"tenant_id"
|
|
659
|
+
],
|
|
660
|
+
"unique": true,
|
|
661
|
+
"nullsNotDistinct": true
|
|
662
|
+
},
|
|
487
663
|
{
|
|
488
664
|
"name": "product_assets_slug_context_idx",
|
|
489
665
|
"columns": [
|
|
490
666
|
"slug",
|
|
491
667
|
"context"
|
|
492
|
-
]
|
|
493
|
-
"unique": true
|
|
668
|
+
]
|
|
494
669
|
},
|
|
495
670
|
{
|
|
496
|
-
"name": "
|
|
671
|
+
"name": "product_assets_tenant_id_created_at_idx",
|
|
497
672
|
"columns": [
|
|
673
|
+
"tenant_id",
|
|
498
674
|
"created_at"
|
|
499
675
|
]
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"name": "product_assets_asset_id_idx",
|
|
679
|
+
"columns": [
|
|
680
|
+
"asset_id"
|
|
681
|
+
]
|
|
500
682
|
}
|
|
501
683
|
],
|
|
502
|
-
"version": "
|
|
684
|
+
"version": "9d67ec65"
|
|
503
685
|
}
|
|
504
686
|
},
|
|
505
687
|
"@happyvertical/smrt-products:ProductCollection": {
|
|
@@ -613,8 +795,8 @@
|
|
|
613
795
|
"exportName": "ProductCollection",
|
|
614
796
|
"collectionExportName": "ProductCollectionCollection",
|
|
615
797
|
"schema": {
|
|
616
|
-
"tableName": "
|
|
617
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
798
|
+
"tableName": "products",
|
|
799
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"products\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_type\" TEXT,\n \"name\" TEXT,\n \"description\" TEXT,\n \"category\" TEXT,\n \"manufacturer\" TEXT,\n \"model\" TEXT,\n \"price\" INTEGER DEFAULT 0,\n \"in_stock\" BOOLEAN DEFAULT TRUE,\n \"specifications\" JSON DEFAULT '{}',\n \"tags\" JSON DEFAULT '[]'\n);",
|
|
618
800
|
"columns": {
|
|
619
801
|
"id": {
|
|
620
802
|
"type": "UUID",
|
|
@@ -631,6 +813,14 @@
|
|
|
631
813
|
"notNull": true,
|
|
632
814
|
"default": ""
|
|
633
815
|
},
|
|
816
|
+
"_meta_type": {
|
|
817
|
+
"type": "TEXT",
|
|
818
|
+
"notNull": true
|
|
819
|
+
},
|
|
820
|
+
"_meta_data": {
|
|
821
|
+
"type": "JSON",
|
|
822
|
+
"notNull": false
|
|
823
|
+
},
|
|
634
824
|
"created_at": {
|
|
635
825
|
"type": "TIMESTAMP",
|
|
636
826
|
"notNull": true,
|
|
@@ -640,25 +830,84 @@
|
|
|
640
830
|
"type": "TIMESTAMP",
|
|
641
831
|
"notNull": true,
|
|
642
832
|
"default": "current_timestamp"
|
|
833
|
+
},
|
|
834
|
+
"tenant_id": {
|
|
835
|
+
"type": "UUID",
|
|
836
|
+
"referenceKind": "tenantId",
|
|
837
|
+
"notNull": false
|
|
838
|
+
},
|
|
839
|
+
"product_type": {
|
|
840
|
+
"type": "TEXT",
|
|
841
|
+
"notNull": false
|
|
842
|
+
},
|
|
843
|
+
"name": {
|
|
844
|
+
"type": "TEXT",
|
|
845
|
+
"notNull": false
|
|
846
|
+
},
|
|
847
|
+
"description": {
|
|
848
|
+
"type": "TEXT",
|
|
849
|
+
"notNull": false
|
|
850
|
+
},
|
|
851
|
+
"category": {
|
|
852
|
+
"type": "TEXT",
|
|
853
|
+
"notNull": false
|
|
854
|
+
},
|
|
855
|
+
"manufacturer": {
|
|
856
|
+
"type": "TEXT",
|
|
857
|
+
"notNull": false
|
|
858
|
+
},
|
|
859
|
+
"model": {
|
|
860
|
+
"type": "TEXT",
|
|
861
|
+
"notNull": false
|
|
862
|
+
},
|
|
863
|
+
"price": {
|
|
864
|
+
"type": "INTEGER",
|
|
865
|
+
"notNull": false,
|
|
866
|
+
"default": 0
|
|
867
|
+
},
|
|
868
|
+
"in_stock": {
|
|
869
|
+
"type": "BOOLEAN",
|
|
870
|
+
"notNull": false,
|
|
871
|
+
"default": true
|
|
872
|
+
},
|
|
873
|
+
"specifications": {
|
|
874
|
+
"type": "JSON",
|
|
875
|
+
"notNull": false,
|
|
876
|
+
"default": {}
|
|
877
|
+
},
|
|
878
|
+
"tags": {
|
|
879
|
+
"type": "JSON",
|
|
880
|
+
"notNull": false,
|
|
881
|
+
"default": []
|
|
643
882
|
}
|
|
644
883
|
},
|
|
645
884
|
"indexes": [
|
|
646
885
|
{
|
|
647
|
-
"name": "
|
|
886
|
+
"name": "products_slug_context_meta_type_idx",
|
|
648
887
|
"columns": [
|
|
888
|
+
"tenant_id",
|
|
649
889
|
"slug",
|
|
650
|
-
"context"
|
|
890
|
+
"context",
|
|
891
|
+
"_meta_type"
|
|
651
892
|
],
|
|
652
|
-
"unique": true
|
|
893
|
+
"unique": true,
|
|
894
|
+
"nullsNotDistinct": true
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"name": "products_meta_type_idx",
|
|
898
|
+
"columns": [
|
|
899
|
+
"_meta_type"
|
|
900
|
+
]
|
|
653
901
|
},
|
|
654
902
|
{
|
|
655
|
-
"name": "
|
|
903
|
+
"name": "products_tenant_id_created_at_idx",
|
|
656
904
|
"columns": [
|
|
905
|
+
"tenant_id",
|
|
657
906
|
"created_at"
|
|
658
907
|
]
|
|
659
908
|
}
|
|
660
909
|
],
|
|
661
|
-
"version": "
|
|
910
|
+
"version": "a7b4d592"
|
|
662
911
|
}
|
|
663
912
|
},
|
|
664
913
|
"@happyvertical/smrt-products:ProductVariantCollection": {
|
|
@@ -713,7 +962,7 @@
|
|
|
713
962
|
"collectionExportName": "ProductVariantCollectionCollection",
|
|
714
963
|
"schema": {
|
|
715
964
|
"tableName": "product_variants",
|
|
716
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"product_variants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
965
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"product_variants\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_id\" TEXT NOT NULL DEFAULT '',\n \"axis_name\" TEXT NOT NULL DEFAULT '',\n \"label\" TEXT DEFAULT '',\n \"allowed_values\" TEXT DEFAULT '[]',\n \"sort_order\" INTEGER DEFAULT 0\n);",
|
|
717
966
|
"columns": {
|
|
718
967
|
"id": {
|
|
719
968
|
"type": "UUID",
|
|
@@ -739,25 +988,71 @@
|
|
|
739
988
|
"type": "TIMESTAMP",
|
|
740
989
|
"notNull": true,
|
|
741
990
|
"default": "current_timestamp"
|
|
991
|
+
},
|
|
992
|
+
"tenant_id": {
|
|
993
|
+
"type": "UUID",
|
|
994
|
+
"referenceKind": "tenantId",
|
|
995
|
+
"notNull": false,
|
|
996
|
+
"unique": false
|
|
997
|
+
},
|
|
998
|
+
"product_id": {
|
|
999
|
+
"type": "TEXT",
|
|
1000
|
+
"notNull": true,
|
|
1001
|
+
"unique": false,
|
|
1002
|
+
"default": ""
|
|
1003
|
+
},
|
|
1004
|
+
"axis_name": {
|
|
1005
|
+
"type": "TEXT",
|
|
1006
|
+
"notNull": true,
|
|
1007
|
+
"unique": false,
|
|
1008
|
+
"default": ""
|
|
1009
|
+
},
|
|
1010
|
+
"label": {
|
|
1011
|
+
"type": "TEXT",
|
|
1012
|
+
"notNull": false,
|
|
1013
|
+
"unique": false,
|
|
1014
|
+
"default": ""
|
|
1015
|
+
},
|
|
1016
|
+
"allowed_values": {
|
|
1017
|
+
"type": "TEXT",
|
|
1018
|
+
"notNull": false,
|
|
1019
|
+
"unique": false,
|
|
1020
|
+
"default": "[]"
|
|
1021
|
+
},
|
|
1022
|
+
"sort_order": {
|
|
1023
|
+
"type": "INTEGER",
|
|
1024
|
+
"notNull": false,
|
|
1025
|
+
"unique": false,
|
|
1026
|
+
"default": 0
|
|
742
1027
|
}
|
|
743
1028
|
},
|
|
744
1029
|
"indexes": [
|
|
1030
|
+
{
|
|
1031
|
+
"name": "product_variants_product_id_axis_name_idx",
|
|
1032
|
+
"columns": [
|
|
1033
|
+
"product_id",
|
|
1034
|
+
"axis_name",
|
|
1035
|
+
"tenant_id"
|
|
1036
|
+
],
|
|
1037
|
+
"unique": true,
|
|
1038
|
+
"nullsNotDistinct": true
|
|
1039
|
+
},
|
|
745
1040
|
{
|
|
746
1041
|
"name": "product_variants_slug_context_idx",
|
|
747
1042
|
"columns": [
|
|
748
1043
|
"slug",
|
|
749
1044
|
"context"
|
|
750
|
-
]
|
|
751
|
-
"unique": true
|
|
1045
|
+
]
|
|
752
1046
|
},
|
|
753
1047
|
{
|
|
754
|
-
"name": "
|
|
1048
|
+
"name": "product_variants_tenant_id_created_at_idx",
|
|
755
1049
|
"columns": [
|
|
1050
|
+
"tenant_id",
|
|
756
1051
|
"created_at"
|
|
757
1052
|
]
|
|
758
1053
|
}
|
|
759
1054
|
],
|
|
760
|
-
"version": "
|
|
1055
|
+
"version": "2891ff02"
|
|
761
1056
|
}
|
|
762
1057
|
},
|
|
763
1058
|
"@happyvertical/smrt-products:SkuCollection": {
|
|
@@ -849,7 +1144,7 @@
|
|
|
849
1144
|
"collectionExportName": "SkuCollectionCollection",
|
|
850
1145
|
"schema": {
|
|
851
1146
|
"tableName": "product_skus",
|
|
852
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"product_skus\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
1147
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"product_skus\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"product_id\" TEXT NOT NULL DEFAULT '',\n \"code\" TEXT NOT NULL DEFAULT '',\n \"barcode\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"attributes\" TEXT DEFAULT '{}',\n \"weight_grams\" REAL,\n \"parent_sku_id\" TEXT DEFAULT '',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
853
1148
|
"columns": {
|
|
854
1149
|
"id": {
|
|
855
1150
|
"type": "UUID",
|
|
@@ -875,25 +1170,87 @@
|
|
|
875
1170
|
"type": "TIMESTAMP",
|
|
876
1171
|
"notNull": true,
|
|
877
1172
|
"default": "current_timestamp"
|
|
1173
|
+
},
|
|
1174
|
+
"tenant_id": {
|
|
1175
|
+
"type": "UUID",
|
|
1176
|
+
"referenceKind": "tenantId",
|
|
1177
|
+
"notNull": false,
|
|
1178
|
+
"unique": false
|
|
1179
|
+
},
|
|
1180
|
+
"product_id": {
|
|
1181
|
+
"type": "TEXT",
|
|
1182
|
+
"notNull": true,
|
|
1183
|
+
"unique": false,
|
|
1184
|
+
"default": ""
|
|
1185
|
+
},
|
|
1186
|
+
"code": {
|
|
1187
|
+
"type": "TEXT",
|
|
1188
|
+
"notNull": true,
|
|
1189
|
+
"unique": false,
|
|
1190
|
+
"default": ""
|
|
1191
|
+
},
|
|
1192
|
+
"barcode": {
|
|
1193
|
+
"type": "TEXT",
|
|
1194
|
+
"notNull": false,
|
|
1195
|
+
"unique": false,
|
|
1196
|
+
"default": ""
|
|
1197
|
+
},
|
|
1198
|
+
"name": {
|
|
1199
|
+
"type": "TEXT",
|
|
1200
|
+
"notNull": false,
|
|
1201
|
+
"unique": false,
|
|
1202
|
+
"default": ""
|
|
1203
|
+
},
|
|
1204
|
+
"attributes": {
|
|
1205
|
+
"type": "TEXT",
|
|
1206
|
+
"notNull": false,
|
|
1207
|
+
"unique": false,
|
|
1208
|
+
"default": "{}"
|
|
1209
|
+
},
|
|
1210
|
+
"weight_grams": {
|
|
1211
|
+
"type": "REAL",
|
|
1212
|
+
"notNull": false,
|
|
1213
|
+
"unique": false
|
|
1214
|
+
},
|
|
1215
|
+
"parent_sku_id": {
|
|
1216
|
+
"type": "TEXT",
|
|
1217
|
+
"notNull": false,
|
|
1218
|
+
"unique": false,
|
|
1219
|
+
"default": ""
|
|
1220
|
+
},
|
|
1221
|
+
"active": {
|
|
1222
|
+
"type": "BOOLEAN",
|
|
1223
|
+
"notNull": false,
|
|
1224
|
+
"unique": false,
|
|
1225
|
+
"default": true
|
|
878
1226
|
}
|
|
879
1227
|
},
|
|
880
1228
|
"indexes": [
|
|
1229
|
+
{
|
|
1230
|
+
"name": "product_skus_code_tenant_id_idx",
|
|
1231
|
+
"columns": [
|
|
1232
|
+
"code",
|
|
1233
|
+
"tenant_id"
|
|
1234
|
+
],
|
|
1235
|
+
"unique": true,
|
|
1236
|
+
"nullsNotDistinct": true
|
|
1237
|
+
},
|
|
881
1238
|
{
|
|
882
1239
|
"name": "product_skus_slug_context_idx",
|
|
883
1240
|
"columns": [
|
|
884
1241
|
"slug",
|
|
885
1242
|
"context"
|
|
886
|
-
]
|
|
887
|
-
"unique": true
|
|
1243
|
+
]
|
|
888
1244
|
},
|
|
889
1245
|
{
|
|
890
|
-
"name": "
|
|
1246
|
+
"name": "product_skus_tenant_id_created_at_idx",
|
|
891
1247
|
"columns": [
|
|
1248
|
+
"tenant_id",
|
|
892
1249
|
"created_at"
|
|
893
1250
|
]
|
|
894
1251
|
}
|
|
895
1252
|
],
|
|
896
|
-
"version": "
|
|
1253
|
+
"version": "89d5a311"
|
|
897
1254
|
}
|
|
898
1255
|
},
|
|
899
1256
|
"@happyvertical/smrt-products:Category": {
|
|
@@ -1093,7 +1450,8 @@
|
|
|
1093
1450
|
"context",
|
|
1094
1451
|
"_meta_type"
|
|
1095
1452
|
],
|
|
1096
|
-
"unique": true
|
|
1453
|
+
"unique": true,
|
|
1454
|
+
"nullsNotDistinct": true
|
|
1097
1455
|
},
|
|
1098
1456
|
{
|
|
1099
1457
|
"name": "categories_meta_type_idx",
|
|
@@ -1449,7 +1807,8 @@
|
|
|
1449
1807
|
"context",
|
|
1450
1808
|
"_meta_type"
|
|
1451
1809
|
],
|
|
1452
|
-
"unique": true
|
|
1810
|
+
"unique": true,
|
|
1811
|
+
"nullsNotDistinct": true
|
|
1453
1812
|
},
|
|
1454
1813
|
{
|
|
1455
1814
|
"name": "products_meta_type_idx",
|
|
@@ -1780,7 +2139,8 @@
|
|
|
1780
2139
|
"context",
|
|
1781
2140
|
"_meta_type"
|
|
1782
2141
|
],
|
|
1783
|
-
"unique": true
|
|
2142
|
+
"unique": true,
|
|
2143
|
+
"nullsNotDistinct": true
|
|
1784
2144
|
},
|
|
1785
2145
|
{
|
|
1786
2146
|
"name": "products_meta_type_idx",
|
|
@@ -1966,7 +2326,8 @@
|
|
|
1966
2326
|
"relationship",
|
|
1967
2327
|
"tenant_id"
|
|
1968
2328
|
],
|
|
1969
|
-
"unique": true
|
|
2329
|
+
"unique": true,
|
|
2330
|
+
"nullsNotDistinct": true
|
|
1970
2331
|
},
|
|
1971
2332
|
{
|
|
1972
2333
|
"name": "product_assets_slug_context_idx",
|
|
@@ -2199,7 +2560,8 @@
|
|
|
2199
2560
|
"axis_name",
|
|
2200
2561
|
"tenant_id"
|
|
2201
2562
|
],
|
|
2202
|
-
"unique": true
|
|
2563
|
+
"unique": true,
|
|
2564
|
+
"nullsNotDistinct": true
|
|
2203
2565
|
},
|
|
2204
2566
|
{
|
|
2205
2567
|
"name": "product_variants_slug_context_idx",
|
|
@@ -2456,7 +2818,8 @@
|
|
|
2456
2818
|
"code",
|
|
2457
2819
|
"tenant_id"
|
|
2458
2820
|
],
|
|
2459
|
-
"unique": true
|
|
2821
|
+
"unique": true,
|
|
2822
|
+
"nullsNotDistinct": true
|
|
2460
2823
|
},
|
|
2461
2824
|
{
|
|
2462
2825
|
"name": "product_skus_slug_context_idx",
|
package/dist/lib/models.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as Product, i as Material, n as ProductVariant, o as ProductType, r as ProductAsset, s as Category, t as Sku } from "./chunks/Sku-Bq9Fr-2f.js";
|
|
2
|
-
import "./chunks/models-
|
|
2
|
+
import "./chunks/models-BTpdH07s.js";
|
|
3
3
|
export { Category, Material, Product, ProductAsset, ProductType, ProductVariant, Sku };
|