@develemit/commerce-server 0.4.0 → 0.7.0

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.
@@ -0,0 +1,1029 @@
1
+ {
2
+ "id": "651da430-9db5-4bbd-babc-30600a4815a9",
3
+ "prevId": "939fc278-462f-447d-8d52-b9673e650114",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.commerce_discount_redemptions": {
8
+ "name": "commerce_discount_redemptions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "discount_id": {
19
+ "name": "discount_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "order_id": {
25
+ "name": "order_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "status": {
31
+ "name": "status",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true,
35
+ "default": "'reserved'"
36
+ },
37
+ "amount_cents": {
38
+ "name": "amount_cents",
39
+ "type": "integer",
40
+ "primaryKey": false,
41
+ "notNull": true
42
+ },
43
+ "created_at": {
44
+ "name": "created_at",
45
+ "type": "timestamp with time zone",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "now()"
49
+ },
50
+ "updated_at": {
51
+ "name": "updated_at",
52
+ "type": "timestamp with time zone",
53
+ "primaryKey": false,
54
+ "notNull": true,
55
+ "default": "now()"
56
+ }
57
+ },
58
+ "indexes": {
59
+ "commerce_discount_redemptions_discount_status_idx": {
60
+ "name": "commerce_discount_redemptions_discount_status_idx",
61
+ "columns": [
62
+ {
63
+ "expression": "discount_id",
64
+ "isExpression": false,
65
+ "asc": true,
66
+ "nulls": "last"
67
+ },
68
+ {
69
+ "expression": "status",
70
+ "isExpression": false,
71
+ "asc": true,
72
+ "nulls": "last"
73
+ }
74
+ ],
75
+ "isUnique": false,
76
+ "concurrently": false,
77
+ "method": "btree",
78
+ "with": {}
79
+ }
80
+ },
81
+ "foreignKeys": {
82
+ "commerce_discount_redemptions_discount_id_commerce_discounts_id_fk": {
83
+ "name": "commerce_discount_redemptions_discount_id_commerce_discounts_id_fk",
84
+ "tableFrom": "commerce_discount_redemptions",
85
+ "tableTo": "commerce_discounts",
86
+ "columnsFrom": [
87
+ "discount_id"
88
+ ],
89
+ "columnsTo": [
90
+ "id"
91
+ ],
92
+ "onDelete": "cascade",
93
+ "onUpdate": "no action"
94
+ },
95
+ "commerce_discount_redemptions_order_id_commerce_orders_id_fk": {
96
+ "name": "commerce_discount_redemptions_order_id_commerce_orders_id_fk",
97
+ "tableFrom": "commerce_discount_redemptions",
98
+ "tableTo": "commerce_orders",
99
+ "columnsFrom": [
100
+ "order_id"
101
+ ],
102
+ "columnsTo": [
103
+ "id"
104
+ ],
105
+ "onDelete": "cascade",
106
+ "onUpdate": "no action"
107
+ }
108
+ },
109
+ "compositePrimaryKeys": {},
110
+ "uniqueConstraints": {
111
+ "commerce_discount_redemptions_order_id_unique": {
112
+ "name": "commerce_discount_redemptions_order_id_unique",
113
+ "nullsNotDistinct": false,
114
+ "columns": [
115
+ "order_id"
116
+ ]
117
+ }
118
+ },
119
+ "policies": {},
120
+ "checkConstraints": {
121
+ "commerce_discount_redemptions_amount_check": {
122
+ "name": "commerce_discount_redemptions_amount_check",
123
+ "value": "\"commerce_discount_redemptions\".\"amount_cents\" > 0"
124
+ },
125
+ "commerce_discount_redemptions_status_check": {
126
+ "name": "commerce_discount_redemptions_status_check",
127
+ "value": "\"commerce_discount_redemptions\".\"status\" in ('reserved', 'committed', 'released')"
128
+ }
129
+ },
130
+ "isRLSEnabled": false
131
+ },
132
+ "public.commerce_discounts": {
133
+ "name": "commerce_discounts",
134
+ "schema": "",
135
+ "columns": {
136
+ "id": {
137
+ "name": "id",
138
+ "type": "uuid",
139
+ "primaryKey": true,
140
+ "notNull": true,
141
+ "default": "gen_random_uuid()"
142
+ },
143
+ "code": {
144
+ "name": "code",
145
+ "type": "text",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "type": {
150
+ "name": "type",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "percent_off": {
156
+ "name": "percent_off",
157
+ "type": "integer",
158
+ "primaryKey": false,
159
+ "notNull": false
160
+ },
161
+ "amount_off_cents": {
162
+ "name": "amount_off_cents",
163
+ "type": "integer",
164
+ "primaryKey": false,
165
+ "notNull": false
166
+ },
167
+ "currency": {
168
+ "name": "currency",
169
+ "type": "text",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "min_subtotal_cents": {
174
+ "name": "min_subtotal_cents",
175
+ "type": "integer",
176
+ "primaryKey": false,
177
+ "notNull": false
178
+ },
179
+ "starts_at": {
180
+ "name": "starts_at",
181
+ "type": "timestamp with time zone",
182
+ "primaryKey": false,
183
+ "notNull": false
184
+ },
185
+ "ends_at": {
186
+ "name": "ends_at",
187
+ "type": "timestamp with time zone",
188
+ "primaryKey": false,
189
+ "notNull": false
190
+ },
191
+ "max_redemptions": {
192
+ "name": "max_redemptions",
193
+ "type": "integer",
194
+ "primaryKey": false,
195
+ "notNull": false
196
+ },
197
+ "active": {
198
+ "name": "active",
199
+ "type": "boolean",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "default": true
203
+ },
204
+ "created_at": {
205
+ "name": "created_at",
206
+ "type": "timestamp with time zone",
207
+ "primaryKey": false,
208
+ "notNull": true,
209
+ "default": "now()"
210
+ },
211
+ "updated_at": {
212
+ "name": "updated_at",
213
+ "type": "timestamp with time zone",
214
+ "primaryKey": false,
215
+ "notNull": true,
216
+ "default": "now()"
217
+ }
218
+ },
219
+ "indexes": {},
220
+ "foreignKeys": {},
221
+ "compositePrimaryKeys": {},
222
+ "uniqueConstraints": {
223
+ "commerce_discounts_code_unique": {
224
+ "name": "commerce_discounts_code_unique",
225
+ "nullsNotDistinct": false,
226
+ "columns": [
227
+ "code"
228
+ ]
229
+ }
230
+ },
231
+ "policies": {},
232
+ "checkConstraints": {
233
+ "commerce_discounts_code_check": {
234
+ "name": "commerce_discounts_code_check",
235
+ "value": "\"commerce_discounts\".\"code\" = upper(\"commerce_discounts\".\"code\")"
236
+ },
237
+ "commerce_discounts_percent_check": {
238
+ "name": "commerce_discounts_percent_check",
239
+ "value": "\"commerce_discounts\".\"percent_off\" is null or (\"commerce_discounts\".\"percent_off\" between 1 and 100)"
240
+ },
241
+ "commerce_discounts_amount_check": {
242
+ "name": "commerce_discounts_amount_check",
243
+ "value": "\"commerce_discounts\".\"amount_off_cents\" is null or \"commerce_discounts\".\"amount_off_cents\" > 0"
244
+ },
245
+ "commerce_discounts_max_redemptions_check": {
246
+ "name": "commerce_discounts_max_redemptions_check",
247
+ "value": "\"commerce_discounts\".\"max_redemptions\" is null or \"commerce_discounts\".\"max_redemptions\" > 0"
248
+ },
249
+ "commerce_discounts_type_fields_check": {
250
+ "name": "commerce_discounts_type_fields_check",
251
+ "value": "(\"commerce_discounts\".\"type\" = 'percent' and \"commerce_discounts\".\"percent_off\" is not null and \"commerce_discounts\".\"amount_off_cents\" is null and \"commerce_discounts\".\"currency\" is null) or (\"commerce_discounts\".\"type\" = 'fixed' and \"commerce_discounts\".\"percent_off\" is null and \"commerce_discounts\".\"amount_off_cents\" is not null and \"commerce_discounts\".\"currency\" is not null)"
252
+ }
253
+ },
254
+ "isRLSEnabled": false
255
+ },
256
+ "public.commerce_inventory_holds": {
257
+ "name": "commerce_inventory_holds",
258
+ "schema": "",
259
+ "columns": {
260
+ "id": {
261
+ "name": "id",
262
+ "type": "uuid",
263
+ "primaryKey": true,
264
+ "notNull": true,
265
+ "default": "gen_random_uuid()"
266
+ },
267
+ "product_id": {
268
+ "name": "product_id",
269
+ "type": "uuid",
270
+ "primaryKey": false,
271
+ "notNull": true
272
+ },
273
+ "quantity": {
274
+ "name": "quantity",
275
+ "type": "integer",
276
+ "primaryKey": false,
277
+ "notNull": true
278
+ },
279
+ "reference": {
280
+ "name": "reference",
281
+ "type": "text",
282
+ "primaryKey": false,
283
+ "notNull": true
284
+ },
285
+ "expires_at": {
286
+ "name": "expires_at",
287
+ "type": "timestamp with time zone",
288
+ "primaryKey": false,
289
+ "notNull": true
290
+ },
291
+ "status": {
292
+ "name": "status",
293
+ "type": "commerce_hold_status",
294
+ "typeSchema": "public",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "default": "'active'"
298
+ },
299
+ "created_at": {
300
+ "name": "created_at",
301
+ "type": "timestamp with time zone",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "default": "now()"
305
+ }
306
+ },
307
+ "indexes": {
308
+ "commerce_inventory_holds_reference_idx": {
309
+ "name": "commerce_inventory_holds_reference_idx",
310
+ "columns": [
311
+ {
312
+ "expression": "reference",
313
+ "isExpression": false,
314
+ "asc": true,
315
+ "nulls": "last"
316
+ }
317
+ ],
318
+ "isUnique": false,
319
+ "concurrently": false,
320
+ "method": "btree",
321
+ "with": {}
322
+ },
323
+ "commerce_inventory_holds_product_status_idx": {
324
+ "name": "commerce_inventory_holds_product_status_idx",
325
+ "columns": [
326
+ {
327
+ "expression": "product_id",
328
+ "isExpression": false,
329
+ "asc": true,
330
+ "nulls": "last"
331
+ },
332
+ {
333
+ "expression": "status",
334
+ "isExpression": false,
335
+ "asc": true,
336
+ "nulls": "last"
337
+ }
338
+ ],
339
+ "isUnique": false,
340
+ "concurrently": false,
341
+ "method": "btree",
342
+ "with": {}
343
+ }
344
+ },
345
+ "foreignKeys": {
346
+ "commerce_inventory_holds_product_id_commerce_products_id_fk": {
347
+ "name": "commerce_inventory_holds_product_id_commerce_products_id_fk",
348
+ "tableFrom": "commerce_inventory_holds",
349
+ "tableTo": "commerce_products",
350
+ "columnsFrom": [
351
+ "product_id"
352
+ ],
353
+ "columnsTo": [
354
+ "id"
355
+ ],
356
+ "onDelete": "cascade",
357
+ "onUpdate": "no action"
358
+ }
359
+ },
360
+ "compositePrimaryKeys": {},
361
+ "uniqueConstraints": {},
362
+ "policies": {},
363
+ "checkConstraints": {
364
+ "commerce_inventory_holds_quantity_check": {
365
+ "name": "commerce_inventory_holds_quantity_check",
366
+ "value": "\"commerce_inventory_holds\".\"quantity\" > 0"
367
+ }
368
+ },
369
+ "isRLSEnabled": false
370
+ },
371
+ "public.commerce_order_items": {
372
+ "name": "commerce_order_items",
373
+ "schema": "",
374
+ "columns": {
375
+ "id": {
376
+ "name": "id",
377
+ "type": "uuid",
378
+ "primaryKey": true,
379
+ "notNull": true,
380
+ "default": "gen_random_uuid()"
381
+ },
382
+ "order_id": {
383
+ "name": "order_id",
384
+ "type": "uuid",
385
+ "primaryKey": false,
386
+ "notNull": true
387
+ },
388
+ "product_id": {
389
+ "name": "product_id",
390
+ "type": "uuid",
391
+ "primaryKey": false,
392
+ "notNull": true
393
+ },
394
+ "name": {
395
+ "name": "name",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true
399
+ },
400
+ "price_cents": {
401
+ "name": "price_cents",
402
+ "type": "integer",
403
+ "primaryKey": false,
404
+ "notNull": true
405
+ },
406
+ "quantity": {
407
+ "name": "quantity",
408
+ "type": "integer",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ }
412
+ },
413
+ "indexes": {},
414
+ "foreignKeys": {
415
+ "commerce_order_items_order_id_commerce_orders_id_fk": {
416
+ "name": "commerce_order_items_order_id_commerce_orders_id_fk",
417
+ "tableFrom": "commerce_order_items",
418
+ "tableTo": "commerce_orders",
419
+ "columnsFrom": [
420
+ "order_id"
421
+ ],
422
+ "columnsTo": [
423
+ "id"
424
+ ],
425
+ "onDelete": "cascade",
426
+ "onUpdate": "no action"
427
+ }
428
+ },
429
+ "compositePrimaryKeys": {},
430
+ "uniqueConstraints": {},
431
+ "policies": {},
432
+ "checkConstraints": {},
433
+ "isRLSEnabled": false
434
+ },
435
+ "public.commerce_order_refunds": {
436
+ "name": "commerce_order_refunds",
437
+ "schema": "",
438
+ "columns": {
439
+ "id": {
440
+ "name": "id",
441
+ "type": "uuid",
442
+ "primaryKey": true,
443
+ "notNull": true,
444
+ "default": "gen_random_uuid()"
445
+ },
446
+ "order_id": {
447
+ "name": "order_id",
448
+ "type": "uuid",
449
+ "primaryKey": false,
450
+ "notNull": true
451
+ },
452
+ "amount_cents": {
453
+ "name": "amount_cents",
454
+ "type": "integer",
455
+ "primaryKey": false,
456
+ "notNull": true
457
+ },
458
+ "currency": {
459
+ "name": "currency",
460
+ "type": "text",
461
+ "primaryKey": false,
462
+ "notNull": true
463
+ },
464
+ "reason": {
465
+ "name": "reason",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": false
469
+ },
470
+ "restocked": {
471
+ "name": "restocked",
472
+ "type": "boolean",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "default": false
476
+ },
477
+ "source": {
478
+ "name": "source",
479
+ "type": "text",
480
+ "primaryKey": false,
481
+ "notNull": true
482
+ },
483
+ "gateway_refund_id": {
484
+ "name": "gateway_refund_id",
485
+ "type": "text",
486
+ "primaryKey": false,
487
+ "notNull": false
488
+ },
489
+ "idempotency_key": {
490
+ "name": "idempotency_key",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": false
494
+ },
495
+ "created_at": {
496
+ "name": "created_at",
497
+ "type": "timestamp with time zone",
498
+ "primaryKey": false,
499
+ "notNull": true,
500
+ "default": "now()"
501
+ }
502
+ },
503
+ "indexes": {
504
+ "commerce_order_refunds_order_idx": {
505
+ "name": "commerce_order_refunds_order_idx",
506
+ "columns": [
507
+ {
508
+ "expression": "order_id",
509
+ "isExpression": false,
510
+ "asc": true,
511
+ "nulls": "last"
512
+ }
513
+ ],
514
+ "isUnique": false,
515
+ "concurrently": false,
516
+ "method": "btree",
517
+ "with": {}
518
+ }
519
+ },
520
+ "foreignKeys": {
521
+ "commerce_order_refunds_order_id_commerce_orders_id_fk": {
522
+ "name": "commerce_order_refunds_order_id_commerce_orders_id_fk",
523
+ "tableFrom": "commerce_order_refunds",
524
+ "tableTo": "commerce_orders",
525
+ "columnsFrom": [
526
+ "order_id"
527
+ ],
528
+ "columnsTo": [
529
+ "id"
530
+ ],
531
+ "onDelete": "cascade",
532
+ "onUpdate": "no action"
533
+ }
534
+ },
535
+ "compositePrimaryKeys": {},
536
+ "uniqueConstraints": {
537
+ "commerce_order_refunds_gateway_refund_id_unique": {
538
+ "name": "commerce_order_refunds_gateway_refund_id_unique",
539
+ "nullsNotDistinct": false,
540
+ "columns": [
541
+ "gateway_refund_id"
542
+ ]
543
+ },
544
+ "commerce_order_refunds_idempotency_unique": {
545
+ "name": "commerce_order_refunds_idempotency_unique",
546
+ "nullsNotDistinct": false,
547
+ "columns": [
548
+ "order_id",
549
+ "idempotency_key"
550
+ ]
551
+ }
552
+ },
553
+ "policies": {},
554
+ "checkConstraints": {
555
+ "commerce_order_refunds_amount_check": {
556
+ "name": "commerce_order_refunds_amount_check",
557
+ "value": "\"commerce_order_refunds\".\"amount_cents\" > 0"
558
+ }
559
+ },
560
+ "isRLSEnabled": false
561
+ },
562
+ "public.commerce_orders": {
563
+ "name": "commerce_orders",
564
+ "schema": "",
565
+ "columns": {
566
+ "id": {
567
+ "name": "id",
568
+ "type": "uuid",
569
+ "primaryKey": true,
570
+ "notNull": true
571
+ },
572
+ "status": {
573
+ "name": "status",
574
+ "type": "commerce_order_status",
575
+ "typeSchema": "public",
576
+ "primaryKey": false,
577
+ "notNull": true,
578
+ "default": "'pending'"
579
+ },
580
+ "email": {
581
+ "name": "email",
582
+ "type": "text",
583
+ "primaryKey": false,
584
+ "notNull": false
585
+ },
586
+ "subtotal_cents": {
587
+ "name": "subtotal_cents",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": true
591
+ },
592
+ "discount_cents": {
593
+ "name": "discount_cents",
594
+ "type": "integer",
595
+ "primaryKey": false,
596
+ "notNull": true,
597
+ "default": 0
598
+ },
599
+ "discount_code": {
600
+ "name": "discount_code",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": false
604
+ },
605
+ "shipping_cents": {
606
+ "name": "shipping_cents",
607
+ "type": "integer",
608
+ "primaryKey": false,
609
+ "notNull": true,
610
+ "default": 0
611
+ },
612
+ "shipping_label": {
613
+ "name": "shipping_label",
614
+ "type": "text",
615
+ "primaryKey": false,
616
+ "notNull": false
617
+ },
618
+ "currency": {
619
+ "name": "currency",
620
+ "type": "text",
621
+ "primaryKey": false,
622
+ "notNull": true
623
+ },
624
+ "checkout_session_id": {
625
+ "name": "checkout_session_id",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": false
629
+ },
630
+ "shipping_address": {
631
+ "name": "shipping_address",
632
+ "type": "jsonb",
633
+ "primaryKey": false,
634
+ "notNull": false
635
+ },
636
+ "fulfillment_carrier": {
637
+ "name": "fulfillment_carrier",
638
+ "type": "text",
639
+ "primaryKey": false,
640
+ "notNull": false
641
+ },
642
+ "fulfillment_tracking_number": {
643
+ "name": "fulfillment_tracking_number",
644
+ "type": "text",
645
+ "primaryKey": false,
646
+ "notNull": false
647
+ },
648
+ "fulfillment_tracking_url": {
649
+ "name": "fulfillment_tracking_url",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": false
653
+ },
654
+ "shipped_at": {
655
+ "name": "shipped_at",
656
+ "type": "timestamp with time zone",
657
+ "primaryKey": false,
658
+ "notNull": false
659
+ },
660
+ "created_at": {
661
+ "name": "created_at",
662
+ "type": "timestamp with time zone",
663
+ "primaryKey": false,
664
+ "notNull": true,
665
+ "default": "now()"
666
+ },
667
+ "updated_at": {
668
+ "name": "updated_at",
669
+ "type": "timestamp with time zone",
670
+ "primaryKey": false,
671
+ "notNull": true,
672
+ "default": "now()"
673
+ }
674
+ },
675
+ "indexes": {},
676
+ "foreignKeys": {},
677
+ "compositePrimaryKeys": {},
678
+ "uniqueConstraints": {
679
+ "commerce_orders_checkout_session_id_unique": {
680
+ "name": "commerce_orders_checkout_session_id_unique",
681
+ "nullsNotDistinct": false,
682
+ "columns": [
683
+ "checkout_session_id"
684
+ ]
685
+ }
686
+ },
687
+ "policies": {},
688
+ "checkConstraints": {},
689
+ "isRLSEnabled": false
690
+ },
691
+ "public.commerce_product_images": {
692
+ "name": "commerce_product_images",
693
+ "schema": "",
694
+ "columns": {
695
+ "id": {
696
+ "name": "id",
697
+ "type": "uuid",
698
+ "primaryKey": true,
699
+ "notNull": true,
700
+ "default": "gen_random_uuid()"
701
+ },
702
+ "product_id": {
703
+ "name": "product_id",
704
+ "type": "uuid",
705
+ "primaryKey": false,
706
+ "notNull": true
707
+ },
708
+ "url": {
709
+ "name": "url",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": true
713
+ },
714
+ "alt": {
715
+ "name": "alt",
716
+ "type": "text",
717
+ "primaryKey": false,
718
+ "notNull": true,
719
+ "default": "''"
720
+ },
721
+ "storage_key": {
722
+ "name": "storage_key",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": false
726
+ },
727
+ "position": {
728
+ "name": "position",
729
+ "type": "integer",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "default": 0
733
+ }
734
+ },
735
+ "indexes": {},
736
+ "foreignKeys": {
737
+ "commerce_product_images_product_id_commerce_products_id_fk": {
738
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
739
+ "tableFrom": "commerce_product_images",
740
+ "tableTo": "commerce_products",
741
+ "columnsFrom": [
742
+ "product_id"
743
+ ],
744
+ "columnsTo": [
745
+ "id"
746
+ ],
747
+ "onDelete": "cascade",
748
+ "onUpdate": "no action"
749
+ }
750
+ },
751
+ "compositePrimaryKeys": {},
752
+ "uniqueConstraints": {},
753
+ "policies": {},
754
+ "checkConstraints": {},
755
+ "isRLSEnabled": false
756
+ },
757
+ "public.commerce_products": {
758
+ "name": "commerce_products",
759
+ "schema": "",
760
+ "columns": {
761
+ "id": {
762
+ "name": "id",
763
+ "type": "uuid",
764
+ "primaryKey": true,
765
+ "notNull": true,
766
+ "default": "gen_random_uuid()"
767
+ },
768
+ "slug": {
769
+ "name": "slug",
770
+ "type": "text",
771
+ "primaryKey": false,
772
+ "notNull": true
773
+ },
774
+ "name": {
775
+ "name": "name",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "default": "''"
780
+ },
781
+ "description": {
782
+ "name": "description",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "default": "''"
787
+ },
788
+ "materials": {
789
+ "name": "materials",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": false
793
+ },
794
+ "dimensions": {
795
+ "name": "dimensions",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": false
799
+ },
800
+ "price_cents": {
801
+ "name": "price_cents",
802
+ "type": "integer",
803
+ "primaryKey": false,
804
+ "notNull": false
805
+ },
806
+ "currency": {
807
+ "name": "currency",
808
+ "type": "text",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ },
812
+ "category": {
813
+ "name": "category",
814
+ "type": "text",
815
+ "primaryKey": false,
816
+ "notNull": false
817
+ },
818
+ "quantity": {
819
+ "name": "quantity",
820
+ "type": "integer",
821
+ "primaryKey": false,
822
+ "notNull": true,
823
+ "default": 1
824
+ },
825
+ "status": {
826
+ "name": "status",
827
+ "type": "commerce_product_status",
828
+ "typeSchema": "public",
829
+ "primaryKey": false,
830
+ "notNull": true,
831
+ "default": "'draft'"
832
+ },
833
+ "featured": {
834
+ "name": "featured",
835
+ "type": "boolean",
836
+ "primaryKey": false,
837
+ "notNull": true,
838
+ "default": false
839
+ },
840
+ "created_at": {
841
+ "name": "created_at",
842
+ "type": "timestamp with time zone",
843
+ "primaryKey": false,
844
+ "notNull": true,
845
+ "default": "now()"
846
+ },
847
+ "updated_at": {
848
+ "name": "updated_at",
849
+ "type": "timestamp with time zone",
850
+ "primaryKey": false,
851
+ "notNull": true,
852
+ "default": "now()"
853
+ }
854
+ },
855
+ "indexes": {},
856
+ "foreignKeys": {},
857
+ "compositePrimaryKeys": {},
858
+ "uniqueConstraints": {
859
+ "commerce_products_slug_unique": {
860
+ "name": "commerce_products_slug_unique",
861
+ "nullsNotDistinct": false,
862
+ "columns": [
863
+ "slug"
864
+ ]
865
+ }
866
+ },
867
+ "policies": {},
868
+ "checkConstraints": {
869
+ "commerce_products_quantity_check": {
870
+ "name": "commerce_products_quantity_check",
871
+ "value": "\"commerce_products\".\"quantity\" >= 0"
872
+ }
873
+ },
874
+ "isRLSEnabled": false
875
+ },
876
+ "public.commerce_shipping_rates": {
877
+ "name": "commerce_shipping_rates",
878
+ "schema": "",
879
+ "columns": {
880
+ "id": {
881
+ "name": "id",
882
+ "type": "uuid",
883
+ "primaryKey": true,
884
+ "notNull": true,
885
+ "default": "gen_random_uuid()"
886
+ },
887
+ "label": {
888
+ "name": "label",
889
+ "type": "text",
890
+ "primaryKey": false,
891
+ "notNull": true
892
+ },
893
+ "amount_cents": {
894
+ "name": "amount_cents",
895
+ "type": "integer",
896
+ "primaryKey": false,
897
+ "notNull": true
898
+ },
899
+ "currency": {
900
+ "name": "currency",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": true
904
+ },
905
+ "min_days": {
906
+ "name": "min_days",
907
+ "type": "integer",
908
+ "primaryKey": false,
909
+ "notNull": false
910
+ },
911
+ "max_days": {
912
+ "name": "max_days",
913
+ "type": "integer",
914
+ "primaryKey": false,
915
+ "notNull": false
916
+ },
917
+ "active": {
918
+ "name": "active",
919
+ "type": "boolean",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "default": true
923
+ },
924
+ "sort": {
925
+ "name": "sort",
926
+ "type": "integer",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "default": 0
930
+ }
931
+ },
932
+ "indexes": {},
933
+ "foreignKeys": {},
934
+ "compositePrimaryKeys": {},
935
+ "uniqueConstraints": {
936
+ "commerce_shipping_rates_label_unique": {
937
+ "name": "commerce_shipping_rates_label_unique",
938
+ "nullsNotDistinct": false,
939
+ "columns": [
940
+ "label"
941
+ ]
942
+ }
943
+ },
944
+ "policies": {},
945
+ "checkConstraints": {
946
+ "commerce_shipping_rates_amount_check": {
947
+ "name": "commerce_shipping_rates_amount_check",
948
+ "value": "\"commerce_shipping_rates\".\"amount_cents\" >= 0"
949
+ }
950
+ },
951
+ "isRLSEnabled": false
952
+ },
953
+ "public.commerce_stripe_events": {
954
+ "name": "commerce_stripe_events",
955
+ "schema": "",
956
+ "columns": {
957
+ "id": {
958
+ "name": "id",
959
+ "type": "text",
960
+ "primaryKey": true,
961
+ "notNull": true
962
+ },
963
+ "type": {
964
+ "name": "type",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true
968
+ },
969
+ "processed_at": {
970
+ "name": "processed_at",
971
+ "type": "timestamp with time zone",
972
+ "primaryKey": false,
973
+ "notNull": true,
974
+ "default": "now()"
975
+ }
976
+ },
977
+ "indexes": {},
978
+ "foreignKeys": {},
979
+ "compositePrimaryKeys": {},
980
+ "uniqueConstraints": {},
981
+ "policies": {},
982
+ "checkConstraints": {},
983
+ "isRLSEnabled": false
984
+ }
985
+ },
986
+ "enums": {
987
+ "public.commerce_hold_status": {
988
+ "name": "commerce_hold_status",
989
+ "schema": "public",
990
+ "values": [
991
+ "active",
992
+ "released",
993
+ "committed"
994
+ ]
995
+ },
996
+ "public.commerce_order_status": {
997
+ "name": "commerce_order_status",
998
+ "schema": "public",
999
+ "values": [
1000
+ "pending",
1001
+ "paid",
1002
+ "shipped",
1003
+ "cancelled",
1004
+ "expired",
1005
+ "needs_attention",
1006
+ "refunded"
1007
+ ]
1008
+ },
1009
+ "public.commerce_product_status": {
1010
+ "name": "commerce_product_status",
1011
+ "schema": "public",
1012
+ "values": [
1013
+ "draft",
1014
+ "active",
1015
+ "archived"
1016
+ ]
1017
+ }
1018
+ },
1019
+ "schemas": {},
1020
+ "sequences": {},
1021
+ "roles": {},
1022
+ "policies": {},
1023
+ "views": {},
1024
+ "_meta": {
1025
+ "columns": {},
1026
+ "schemas": {},
1027
+ "tables": {}
1028
+ }
1029
+ }