@develemit/commerce-server 0.7.0 → 0.9.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,1042 @@
1
+ {
2
+ "id": "826d7f15-be2a-4ee7-a41a-75851eb32a8a",
3
+ "prevId": "3f713801-fa28-4a65-818e-272932759eaa",
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
+ "tax_cents": {
619
+ "name": "tax_cents",
620
+ "type": "integer",
621
+ "primaryKey": false,
622
+ "notNull": true,
623
+ "default": 0
624
+ },
625
+ "currency": {
626
+ "name": "currency",
627
+ "type": "text",
628
+ "primaryKey": false,
629
+ "notNull": true
630
+ },
631
+ "checkout_session_id": {
632
+ "name": "checkout_session_id",
633
+ "type": "text",
634
+ "primaryKey": false,
635
+ "notNull": false
636
+ },
637
+ "shipping_address": {
638
+ "name": "shipping_address",
639
+ "type": "jsonb",
640
+ "primaryKey": false,
641
+ "notNull": false
642
+ },
643
+ "fulfillment_carrier": {
644
+ "name": "fulfillment_carrier",
645
+ "type": "text",
646
+ "primaryKey": false,
647
+ "notNull": false
648
+ },
649
+ "fulfillment_tracking_number": {
650
+ "name": "fulfillment_tracking_number",
651
+ "type": "text",
652
+ "primaryKey": false,
653
+ "notNull": false
654
+ },
655
+ "fulfillment_tracking_url": {
656
+ "name": "fulfillment_tracking_url",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": false
660
+ },
661
+ "shipped_at": {
662
+ "name": "shipped_at",
663
+ "type": "timestamp with time zone",
664
+ "primaryKey": false,
665
+ "notNull": false
666
+ },
667
+ "created_at": {
668
+ "name": "created_at",
669
+ "type": "timestamp with time zone",
670
+ "primaryKey": false,
671
+ "notNull": true,
672
+ "default": "now()"
673
+ },
674
+ "updated_at": {
675
+ "name": "updated_at",
676
+ "type": "timestamp with time zone",
677
+ "primaryKey": false,
678
+ "notNull": true,
679
+ "default": "now()"
680
+ }
681
+ },
682
+ "indexes": {},
683
+ "foreignKeys": {},
684
+ "compositePrimaryKeys": {},
685
+ "uniqueConstraints": {
686
+ "commerce_orders_checkout_session_id_unique": {
687
+ "name": "commerce_orders_checkout_session_id_unique",
688
+ "nullsNotDistinct": false,
689
+ "columns": [
690
+ "checkout_session_id"
691
+ ]
692
+ }
693
+ },
694
+ "policies": {},
695
+ "checkConstraints": {},
696
+ "isRLSEnabled": false
697
+ },
698
+ "public.commerce_product_images": {
699
+ "name": "commerce_product_images",
700
+ "schema": "",
701
+ "columns": {
702
+ "id": {
703
+ "name": "id",
704
+ "type": "uuid",
705
+ "primaryKey": true,
706
+ "notNull": true,
707
+ "default": "gen_random_uuid()"
708
+ },
709
+ "product_id": {
710
+ "name": "product_id",
711
+ "type": "uuid",
712
+ "primaryKey": false,
713
+ "notNull": true
714
+ },
715
+ "url": {
716
+ "name": "url",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true
720
+ },
721
+ "alt": {
722
+ "name": "alt",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "default": "''"
727
+ },
728
+ "storage_key": {
729
+ "name": "storage_key",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": false
733
+ },
734
+ "position": {
735
+ "name": "position",
736
+ "type": "integer",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "default": 0
740
+ }
741
+ },
742
+ "indexes": {},
743
+ "foreignKeys": {
744
+ "commerce_product_images_product_id_commerce_products_id_fk": {
745
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
746
+ "tableFrom": "commerce_product_images",
747
+ "tableTo": "commerce_products",
748
+ "columnsFrom": [
749
+ "product_id"
750
+ ],
751
+ "columnsTo": [
752
+ "id"
753
+ ],
754
+ "onDelete": "cascade",
755
+ "onUpdate": "no action"
756
+ }
757
+ },
758
+ "compositePrimaryKeys": {},
759
+ "uniqueConstraints": {},
760
+ "policies": {},
761
+ "checkConstraints": {},
762
+ "isRLSEnabled": false
763
+ },
764
+ "public.commerce_products": {
765
+ "name": "commerce_products",
766
+ "schema": "",
767
+ "columns": {
768
+ "id": {
769
+ "name": "id",
770
+ "type": "uuid",
771
+ "primaryKey": true,
772
+ "notNull": true,
773
+ "default": "gen_random_uuid()"
774
+ },
775
+ "slug": {
776
+ "name": "slug",
777
+ "type": "text",
778
+ "primaryKey": false,
779
+ "notNull": true
780
+ },
781
+ "name": {
782
+ "name": "name",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "default": "''"
787
+ },
788
+ "description": {
789
+ "name": "description",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "default": "''"
794
+ },
795
+ "materials": {
796
+ "name": "materials",
797
+ "type": "text",
798
+ "primaryKey": false,
799
+ "notNull": false
800
+ },
801
+ "dimensions": {
802
+ "name": "dimensions",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": false
806
+ },
807
+ "price_cents": {
808
+ "name": "price_cents",
809
+ "type": "integer",
810
+ "primaryKey": false,
811
+ "notNull": false
812
+ },
813
+ "currency": {
814
+ "name": "currency",
815
+ "type": "text",
816
+ "primaryKey": false,
817
+ "notNull": true
818
+ },
819
+ "category": {
820
+ "name": "category",
821
+ "type": "text",
822
+ "primaryKey": false,
823
+ "notNull": false
824
+ },
825
+ "quantity": {
826
+ "name": "quantity",
827
+ "type": "integer",
828
+ "primaryKey": false,
829
+ "notNull": true,
830
+ "default": 1
831
+ },
832
+ "status": {
833
+ "name": "status",
834
+ "type": "commerce_product_status",
835
+ "typeSchema": "public",
836
+ "primaryKey": false,
837
+ "notNull": true,
838
+ "default": "'draft'"
839
+ },
840
+ "featured": {
841
+ "name": "featured",
842
+ "type": "boolean",
843
+ "primaryKey": false,
844
+ "notNull": true,
845
+ "default": false
846
+ },
847
+ "published_at": {
848
+ "name": "published_at",
849
+ "type": "timestamp with time zone",
850
+ "primaryKey": false,
851
+ "notNull": false
852
+ },
853
+ "created_at": {
854
+ "name": "created_at",
855
+ "type": "timestamp with time zone",
856
+ "primaryKey": false,
857
+ "notNull": true,
858
+ "default": "now()"
859
+ },
860
+ "updated_at": {
861
+ "name": "updated_at",
862
+ "type": "timestamp with time zone",
863
+ "primaryKey": false,
864
+ "notNull": true,
865
+ "default": "now()"
866
+ }
867
+ },
868
+ "indexes": {},
869
+ "foreignKeys": {},
870
+ "compositePrimaryKeys": {},
871
+ "uniqueConstraints": {
872
+ "commerce_products_slug_unique": {
873
+ "name": "commerce_products_slug_unique",
874
+ "nullsNotDistinct": false,
875
+ "columns": [
876
+ "slug"
877
+ ]
878
+ }
879
+ },
880
+ "policies": {},
881
+ "checkConstraints": {
882
+ "commerce_products_quantity_check": {
883
+ "name": "commerce_products_quantity_check",
884
+ "value": "\"commerce_products\".\"quantity\" >= 0"
885
+ }
886
+ },
887
+ "isRLSEnabled": false
888
+ },
889
+ "public.commerce_shipping_rates": {
890
+ "name": "commerce_shipping_rates",
891
+ "schema": "",
892
+ "columns": {
893
+ "id": {
894
+ "name": "id",
895
+ "type": "uuid",
896
+ "primaryKey": true,
897
+ "notNull": true,
898
+ "default": "gen_random_uuid()"
899
+ },
900
+ "label": {
901
+ "name": "label",
902
+ "type": "text",
903
+ "primaryKey": false,
904
+ "notNull": true
905
+ },
906
+ "amount_cents": {
907
+ "name": "amount_cents",
908
+ "type": "integer",
909
+ "primaryKey": false,
910
+ "notNull": true
911
+ },
912
+ "currency": {
913
+ "name": "currency",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true
917
+ },
918
+ "min_days": {
919
+ "name": "min_days",
920
+ "type": "integer",
921
+ "primaryKey": false,
922
+ "notNull": false
923
+ },
924
+ "max_days": {
925
+ "name": "max_days",
926
+ "type": "integer",
927
+ "primaryKey": false,
928
+ "notNull": false
929
+ },
930
+ "active": {
931
+ "name": "active",
932
+ "type": "boolean",
933
+ "primaryKey": false,
934
+ "notNull": true,
935
+ "default": true
936
+ },
937
+ "sort": {
938
+ "name": "sort",
939
+ "type": "integer",
940
+ "primaryKey": false,
941
+ "notNull": true,
942
+ "default": 0
943
+ }
944
+ },
945
+ "indexes": {},
946
+ "foreignKeys": {},
947
+ "compositePrimaryKeys": {},
948
+ "uniqueConstraints": {
949
+ "commerce_shipping_rates_label_unique": {
950
+ "name": "commerce_shipping_rates_label_unique",
951
+ "nullsNotDistinct": false,
952
+ "columns": [
953
+ "label"
954
+ ]
955
+ }
956
+ },
957
+ "policies": {},
958
+ "checkConstraints": {
959
+ "commerce_shipping_rates_amount_check": {
960
+ "name": "commerce_shipping_rates_amount_check",
961
+ "value": "\"commerce_shipping_rates\".\"amount_cents\" >= 0"
962
+ }
963
+ },
964
+ "isRLSEnabled": false
965
+ },
966
+ "public.commerce_stripe_events": {
967
+ "name": "commerce_stripe_events",
968
+ "schema": "",
969
+ "columns": {
970
+ "id": {
971
+ "name": "id",
972
+ "type": "text",
973
+ "primaryKey": true,
974
+ "notNull": true
975
+ },
976
+ "type": {
977
+ "name": "type",
978
+ "type": "text",
979
+ "primaryKey": false,
980
+ "notNull": true
981
+ },
982
+ "processed_at": {
983
+ "name": "processed_at",
984
+ "type": "timestamp with time zone",
985
+ "primaryKey": false,
986
+ "notNull": true,
987
+ "default": "now()"
988
+ }
989
+ },
990
+ "indexes": {},
991
+ "foreignKeys": {},
992
+ "compositePrimaryKeys": {},
993
+ "uniqueConstraints": {},
994
+ "policies": {},
995
+ "checkConstraints": {},
996
+ "isRLSEnabled": false
997
+ }
998
+ },
999
+ "enums": {
1000
+ "public.commerce_hold_status": {
1001
+ "name": "commerce_hold_status",
1002
+ "schema": "public",
1003
+ "values": [
1004
+ "active",
1005
+ "released",
1006
+ "committed"
1007
+ ]
1008
+ },
1009
+ "public.commerce_order_status": {
1010
+ "name": "commerce_order_status",
1011
+ "schema": "public",
1012
+ "values": [
1013
+ "pending",
1014
+ "paid",
1015
+ "shipped",
1016
+ "cancelled",
1017
+ "expired",
1018
+ "needs_attention",
1019
+ "refunded"
1020
+ ]
1021
+ },
1022
+ "public.commerce_product_status": {
1023
+ "name": "commerce_product_status",
1024
+ "schema": "public",
1025
+ "values": [
1026
+ "draft",
1027
+ "active",
1028
+ "archived"
1029
+ ]
1030
+ }
1031
+ },
1032
+ "schemas": {},
1033
+ "sequences": {},
1034
+ "roles": {},
1035
+ "policies": {},
1036
+ "views": {},
1037
+ "_meta": {
1038
+ "columns": {},
1039
+ "schemas": {},
1040
+ "tables": {}
1041
+ }
1042
+ }