@queelabs/db 0.0.1 → 0.0.2

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.
@@ -1,3131 +0,0 @@
1
- {
2
- "id": "9b29a76d-cc53-407c-bfd3-4021fdd89b39",
3
- "prevId": "3e5c52d6-4ba3-4bfb-b983-932691c6e6dc",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "public.actor_memberships": {
8
- "name": "actor_memberships",
9
- "schema": "",
10
- "columns": {
11
- "actor_id": {
12
- "name": "actor_id",
13
- "type": "text",
14
- "primaryKey": false,
15
- "notNull": true
16
- },
17
- "marketplace_id": {
18
- "name": "marketplace_id",
19
- "type": "text",
20
- "primaryKey": false,
21
- "notNull": true
22
- },
23
- "role": {
24
- "name": "role",
25
- "type": "text",
26
- "primaryKey": false,
27
- "notNull": true
28
- }
29
- },
30
- "indexes": {},
31
- "foreignKeys": {
32
- "actor_memberships_actor_id_actors_id_fk": {
33
- "name": "actor_memberships_actor_id_actors_id_fk",
34
- "tableFrom": "actor_memberships",
35
- "tableTo": "actors",
36
- "columnsFrom": [
37
- "actor_id"
38
- ],
39
- "columnsTo": [
40
- "id"
41
- ],
42
- "onDelete": "cascade",
43
- "onUpdate": "no action"
44
- },
45
- "actor_memberships_marketplace_id_marketplaces_id_fk": {
46
- "name": "actor_memberships_marketplace_id_marketplaces_id_fk",
47
- "tableFrom": "actor_memberships",
48
- "tableTo": "marketplaces",
49
- "columnsFrom": [
50
- "marketplace_id"
51
- ],
52
- "columnsTo": [
53
- "id"
54
- ],
55
- "onDelete": "cascade",
56
- "onUpdate": "no action"
57
- }
58
- },
59
- "compositePrimaryKeys": {
60
- "actor_memberships_actor_id_marketplace_id_pk": {
61
- "name": "actor_memberships_actor_id_marketplace_id_pk",
62
- "columns": [
63
- "actor_id",
64
- "marketplace_id"
65
- ]
66
- }
67
- },
68
- "uniqueConstraints": {},
69
- "policies": {},
70
- "checkConstraints": {},
71
- "isRLSEnabled": false
72
- },
73
- "public.actors": {
74
- "name": "actors",
75
- "schema": "",
76
- "columns": {
77
- "id": {
78
- "name": "id",
79
- "type": "text",
80
- "primaryKey": true,
81
- "notNull": true
82
- },
83
- "marketplace_id": {
84
- "name": "marketplace_id",
85
- "type": "text",
86
- "primaryKey": false,
87
- "notNull": true
88
- },
89
- "external_ref": {
90
- "name": "external_ref",
91
- "type": "text",
92
- "primaryKey": false,
93
- "notNull": false
94
- },
95
- "type": {
96
- "name": "type",
97
- "type": "text",
98
- "primaryKey": false,
99
- "notNull": true
100
- },
101
- "display_name": {
102
- "name": "display_name",
103
- "type": "text",
104
- "primaryKey": false,
105
- "notNull": true
106
- },
107
- "metadata": {
108
- "name": "metadata",
109
- "type": "jsonb",
110
- "primaryKey": false,
111
- "notNull": false
112
- },
113
- "created_at": {
114
- "name": "created_at",
115
- "type": "timestamp with time zone",
116
- "primaryKey": false,
117
- "notNull": true,
118
- "default": "now()"
119
- },
120
- "updated_at": {
121
- "name": "updated_at",
122
- "type": "timestamp with time zone",
123
- "primaryKey": false,
124
- "notNull": true,
125
- "default": "now()"
126
- }
127
- },
128
- "indexes": {
129
- "actors_marketplace_idx": {
130
- "name": "actors_marketplace_idx",
131
- "columns": [
132
- {
133
- "expression": "marketplace_id",
134
- "isExpression": false,
135
- "asc": true,
136
- "nulls": "last"
137
- }
138
- ],
139
- "isUnique": false,
140
- "concurrently": false,
141
- "method": "btree",
142
- "with": {}
143
- },
144
- "actors_marketplace_external_ref_uq": {
145
- "name": "actors_marketplace_external_ref_uq",
146
- "columns": [
147
- {
148
- "expression": "marketplace_id",
149
- "isExpression": false,
150
- "asc": true,
151
- "nulls": "last"
152
- },
153
- {
154
- "expression": "external_ref",
155
- "isExpression": false,
156
- "asc": true,
157
- "nulls": "last"
158
- }
159
- ],
160
- "isUnique": true,
161
- "concurrently": false,
162
- "method": "btree",
163
- "with": {}
164
- }
165
- },
166
- "foreignKeys": {
167
- "actors_marketplace_id_marketplaces_id_fk": {
168
- "name": "actors_marketplace_id_marketplaces_id_fk",
169
- "tableFrom": "actors",
170
- "tableTo": "marketplaces",
171
- "columnsFrom": [
172
- "marketplace_id"
173
- ],
174
- "columnsTo": [
175
- "id"
176
- ],
177
- "onDelete": "cascade",
178
- "onUpdate": "no action"
179
- }
180
- },
181
- "compositePrimaryKeys": {},
182
- "uniqueConstraints": {},
183
- "policies": {},
184
- "checkConstraints": {},
185
- "isRLSEnabled": false
186
- },
187
- "public.admin_users": {
188
- "name": "admin_users",
189
- "schema": "",
190
- "columns": {
191
- "id": {
192
- "name": "id",
193
- "type": "text",
194
- "primaryKey": true,
195
- "notNull": true
196
- },
197
- "email": {
198
- "name": "email",
199
- "type": "text",
200
- "primaryKey": false,
201
- "notNull": true
202
- },
203
- "external_ref": {
204
- "name": "external_ref",
205
- "type": "text",
206
- "primaryKey": false,
207
- "notNull": false
208
- },
209
- "created_at": {
210
- "name": "created_at",
211
- "type": "timestamp with time zone",
212
- "primaryKey": false,
213
- "notNull": true,
214
- "default": "now()"
215
- },
216
- "updated_at": {
217
- "name": "updated_at",
218
- "type": "timestamp with time zone",
219
- "primaryKey": false,
220
- "notNull": true,
221
- "default": "now()"
222
- }
223
- },
224
- "indexes": {
225
- "admin_users_email_uq": {
226
- "name": "admin_users_email_uq",
227
- "columns": [
228
- {
229
- "expression": "email",
230
- "isExpression": false,
231
- "asc": true,
232
- "nulls": "last"
233
- }
234
- ],
235
- "isUnique": true,
236
- "concurrently": false,
237
- "method": "btree",
238
- "with": {}
239
- }
240
- },
241
- "foreignKeys": {},
242
- "compositePrimaryKeys": {},
243
- "uniqueConstraints": {},
244
- "policies": {},
245
- "checkConstraints": {},
246
- "isRLSEnabled": false
247
- },
248
- "public.agent_tokens": {
249
- "name": "agent_tokens",
250
- "schema": "",
251
- "columns": {
252
- "id": {
253
- "name": "id",
254
- "type": "text",
255
- "primaryKey": true,
256
- "notNull": true
257
- },
258
- "marketplace_id": {
259
- "name": "marketplace_id",
260
- "type": "text",
261
- "primaryKey": false,
262
- "notNull": true
263
- },
264
- "actor_id": {
265
- "name": "actor_id",
266
- "type": "text",
267
- "primaryKey": false,
268
- "notNull": false
269
- },
270
- "hashed_token": {
271
- "name": "hashed_token",
272
- "type": "text",
273
- "primaryKey": false,
274
- "notNull": true
275
- },
276
- "label": {
277
- "name": "label",
278
- "type": "text",
279
- "primaryKey": false,
280
- "notNull": false
281
- },
282
- "expires_at": {
283
- "name": "expires_at",
284
- "type": "timestamp with time zone",
285
- "primaryKey": false,
286
- "notNull": false
287
- },
288
- "created_at": {
289
- "name": "created_at",
290
- "type": "timestamp with time zone",
291
- "primaryKey": false,
292
- "notNull": true,
293
- "default": "now()"
294
- }
295
- },
296
- "indexes": {
297
- "agent_tokens_marketplace_idx": {
298
- "name": "agent_tokens_marketplace_idx",
299
- "columns": [
300
- {
301
- "expression": "marketplace_id",
302
- "isExpression": false,
303
- "asc": true,
304
- "nulls": "last"
305
- }
306
- ],
307
- "isUnique": false,
308
- "concurrently": false,
309
- "method": "btree",
310
- "with": {}
311
- }
312
- },
313
- "foreignKeys": {
314
- "agent_tokens_marketplace_id_marketplaces_id_fk": {
315
- "name": "agent_tokens_marketplace_id_marketplaces_id_fk",
316
- "tableFrom": "agent_tokens",
317
- "tableTo": "marketplaces",
318
- "columnsFrom": [
319
- "marketplace_id"
320
- ],
321
- "columnsTo": [
322
- "id"
323
- ],
324
- "onDelete": "cascade",
325
- "onUpdate": "no action"
326
- },
327
- "agent_tokens_actor_id_actors_id_fk": {
328
- "name": "agent_tokens_actor_id_actors_id_fk",
329
- "tableFrom": "agent_tokens",
330
- "tableTo": "actors",
331
- "columnsFrom": [
332
- "actor_id"
333
- ],
334
- "columnsTo": [
335
- "id"
336
- ],
337
- "onDelete": "set null",
338
- "onUpdate": "no action"
339
- }
340
- },
341
- "compositePrimaryKeys": {},
342
- "uniqueConstraints": {},
343
- "policies": {},
344
- "checkConstraints": {},
345
- "isRLSEnabled": false
346
- },
347
- "public.api_keys": {
348
- "name": "api_keys",
349
- "schema": "",
350
- "columns": {
351
- "id": {
352
- "name": "id",
353
- "type": "text",
354
- "primaryKey": true,
355
- "notNull": true
356
- },
357
- "marketplace_id": {
358
- "name": "marketplace_id",
359
- "type": "text",
360
- "primaryKey": false,
361
- "notNull": true
362
- },
363
- "name": {
364
- "name": "name",
365
- "type": "text",
366
- "primaryKey": false,
367
- "notNull": true
368
- },
369
- "hashed_key": {
370
- "name": "hashed_key",
371
- "type": "text",
372
- "primaryKey": false,
373
- "notNull": true
374
- },
375
- "prefix": {
376
- "name": "prefix",
377
- "type": "text",
378
- "primaryKey": false,
379
- "notNull": true
380
- },
381
- "scopes": {
382
- "name": "scopes",
383
- "type": "jsonb",
384
- "primaryKey": false,
385
- "notNull": true,
386
- "default": "'[\"*\"]'::jsonb"
387
- },
388
- "revoked_at": {
389
- "name": "revoked_at",
390
- "type": "timestamp with time zone",
391
- "primaryKey": false,
392
- "notNull": false
393
- },
394
- "expires_at": {
395
- "name": "expires_at",
396
- "type": "timestamp with time zone",
397
- "primaryKey": false,
398
- "notNull": false
399
- },
400
- "last_used_at": {
401
- "name": "last_used_at",
402
- "type": "timestamp with time zone",
403
- "primaryKey": false,
404
- "notNull": false
405
- },
406
- "created_at": {
407
- "name": "created_at",
408
- "type": "timestamp with time zone",
409
- "primaryKey": false,
410
- "notNull": true,
411
- "default": "now()"
412
- }
413
- },
414
- "indexes": {
415
- "api_keys_marketplace_idx": {
416
- "name": "api_keys_marketplace_idx",
417
- "columns": [
418
- {
419
- "expression": "marketplace_id",
420
- "isExpression": false,
421
- "asc": true,
422
- "nulls": "last"
423
- }
424
- ],
425
- "isUnique": false,
426
- "concurrently": false,
427
- "method": "btree",
428
- "with": {}
429
- }
430
- },
431
- "foreignKeys": {
432
- "api_keys_marketplace_id_marketplaces_id_fk": {
433
- "name": "api_keys_marketplace_id_marketplaces_id_fk",
434
- "tableFrom": "api_keys",
435
- "tableTo": "marketplaces",
436
- "columnsFrom": [
437
- "marketplace_id"
438
- ],
439
- "columnsTo": [
440
- "id"
441
- ],
442
- "onDelete": "cascade",
443
- "onUpdate": "no action"
444
- }
445
- },
446
- "compositePrimaryKeys": {},
447
- "uniqueConstraints": {},
448
- "policies": {},
449
- "checkConstraints": {},
450
- "isRLSEnabled": false
451
- },
452
- "public.audit_logs": {
453
- "name": "audit_logs",
454
- "schema": "",
455
- "columns": {
456
- "id": {
457
- "name": "id",
458
- "type": "text",
459
- "primaryKey": true,
460
- "notNull": true
461
- },
462
- "marketplace_id": {
463
- "name": "marketplace_id",
464
- "type": "text",
465
- "primaryKey": false,
466
- "notNull": false
467
- },
468
- "actor_id": {
469
- "name": "actor_id",
470
- "type": "text",
471
- "primaryKey": false,
472
- "notNull": false
473
- },
474
- "action": {
475
- "name": "action",
476
- "type": "text",
477
- "primaryKey": false,
478
- "notNull": true
479
- },
480
- "resource": {
481
- "name": "resource",
482
- "type": "text",
483
- "primaryKey": false,
484
- "notNull": true
485
- },
486
- "metadata": {
487
- "name": "metadata",
488
- "type": "jsonb",
489
- "primaryKey": false,
490
- "notNull": false
491
- },
492
- "created_at": {
493
- "name": "created_at",
494
- "type": "timestamp with time zone",
495
- "primaryKey": false,
496
- "notNull": true,
497
- "default": "now()"
498
- }
499
- },
500
- "indexes": {
501
- "audit_logs_marketplace_idx": {
502
- "name": "audit_logs_marketplace_idx",
503
- "columns": [
504
- {
505
- "expression": "marketplace_id",
506
- "isExpression": false,
507
- "asc": true,
508
- "nulls": "last"
509
- }
510
- ],
511
- "isUnique": false,
512
- "concurrently": false,
513
- "method": "btree",
514
- "with": {}
515
- }
516
- },
517
- "foreignKeys": {
518
- "audit_logs_marketplace_id_marketplaces_id_fk": {
519
- "name": "audit_logs_marketplace_id_marketplaces_id_fk",
520
- "tableFrom": "audit_logs",
521
- "tableTo": "marketplaces",
522
- "columnsFrom": [
523
- "marketplace_id"
524
- ],
525
- "columnsTo": [
526
- "id"
527
- ],
528
- "onDelete": "set null",
529
- "onUpdate": "no action"
530
- },
531
- "audit_logs_actor_id_actors_id_fk": {
532
- "name": "audit_logs_actor_id_actors_id_fk",
533
- "tableFrom": "audit_logs",
534
- "tableTo": "actors",
535
- "columnsFrom": [
536
- "actor_id"
537
- ],
538
- "columnsTo": [
539
- "id"
540
- ],
541
- "onDelete": "set null",
542
- "onUpdate": "no action"
543
- }
544
- },
545
- "compositePrimaryKeys": {},
546
- "uniqueConstraints": {},
547
- "policies": {},
548
- "checkConstraints": {},
549
- "isRLSEnabled": false
550
- },
551
- "public.disputes": {
552
- "name": "disputes",
553
- "schema": "",
554
- "columns": {
555
- "id": {
556
- "name": "id",
557
- "type": "text",
558
- "primaryKey": true,
559
- "notNull": true
560
- },
561
- "marketplace_id": {
562
- "name": "marketplace_id",
563
- "type": "text",
564
- "primaryKey": false,
565
- "notNull": true
566
- },
567
- "order_id": {
568
- "name": "order_id",
569
- "type": "text",
570
- "primaryKey": false,
571
- "notNull": true
572
- },
573
- "status": {
574
- "name": "status",
575
- "type": "text",
576
- "primaryKey": false,
577
- "notNull": true,
578
- "default": "'open'"
579
- },
580
- "reason": {
581
- "name": "reason",
582
- "type": "text",
583
- "primaryKey": false,
584
- "notNull": false
585
- },
586
- "created_at": {
587
- "name": "created_at",
588
- "type": "timestamp with time zone",
589
- "primaryKey": false,
590
- "notNull": true,
591
- "default": "now()"
592
- },
593
- "updated_at": {
594
- "name": "updated_at",
595
- "type": "timestamp with time zone",
596
- "primaryKey": false,
597
- "notNull": true,
598
- "default": "now()"
599
- }
600
- },
601
- "indexes": {
602
- "disputes_order_idx": {
603
- "name": "disputes_order_idx",
604
- "columns": [
605
- {
606
- "expression": "order_id",
607
- "isExpression": false,
608
- "asc": true,
609
- "nulls": "last"
610
- }
611
- ],
612
- "isUnique": false,
613
- "concurrently": false,
614
- "method": "btree",
615
- "with": {}
616
- }
617
- },
618
- "foreignKeys": {
619
- "disputes_marketplace_id_marketplaces_id_fk": {
620
- "name": "disputes_marketplace_id_marketplaces_id_fk",
621
- "tableFrom": "disputes",
622
- "tableTo": "marketplaces",
623
- "columnsFrom": [
624
- "marketplace_id"
625
- ],
626
- "columnsTo": [
627
- "id"
628
- ],
629
- "onDelete": "cascade",
630
- "onUpdate": "no action"
631
- },
632
- "disputes_order_id_orders_id_fk": {
633
- "name": "disputes_order_id_orders_id_fk",
634
- "tableFrom": "disputes",
635
- "tableTo": "orders",
636
- "columnsFrom": [
637
- "order_id"
638
- ],
639
- "columnsTo": [
640
- "id"
641
- ],
642
- "onDelete": "cascade",
643
- "onUpdate": "no action"
644
- }
645
- },
646
- "compositePrimaryKeys": {},
647
- "uniqueConstraints": {},
648
- "policies": {},
649
- "checkConstraints": {},
650
- "isRLSEnabled": false
651
- },
652
- "public.domain_events": {
653
- "name": "domain_events",
654
- "schema": "",
655
- "columns": {
656
- "id": {
657
- "name": "id",
658
- "type": "text",
659
- "primaryKey": true,
660
- "notNull": true
661
- },
662
- "marketplace_id": {
663
- "name": "marketplace_id",
664
- "type": "text",
665
- "primaryKey": false,
666
- "notNull": true
667
- },
668
- "type": {
669
- "name": "type",
670
- "type": "text",
671
- "primaryKey": false,
672
- "notNull": true
673
- },
674
- "aggregate_type": {
675
- "name": "aggregate_type",
676
- "type": "text",
677
- "primaryKey": false,
678
- "notNull": true
679
- },
680
- "aggregate_id": {
681
- "name": "aggregate_id",
682
- "type": "text",
683
- "primaryKey": false,
684
- "notNull": true
685
- },
686
- "payload": {
687
- "name": "payload",
688
- "type": "jsonb",
689
- "primaryKey": false,
690
- "notNull": true
691
- },
692
- "occurred_at": {
693
- "name": "occurred_at",
694
- "type": "timestamp with time zone",
695
- "primaryKey": false,
696
- "notNull": true
697
- },
698
- "processed_at": {
699
- "name": "processed_at",
700
- "type": "timestamp with time zone",
701
- "primaryKey": false,
702
- "notNull": false
703
- },
704
- "idempotency_key": {
705
- "name": "idempotency_key",
706
- "type": "text",
707
- "primaryKey": false,
708
- "notNull": false
709
- }
710
- },
711
- "indexes": {
712
- "domain_events_marketplace_idx": {
713
- "name": "domain_events_marketplace_idx",
714
- "columns": [
715
- {
716
- "expression": "marketplace_id",
717
- "isExpression": false,
718
- "asc": true,
719
- "nulls": "last"
720
- }
721
- ],
722
- "isUnique": false,
723
- "concurrently": false,
724
- "method": "btree",
725
- "with": {}
726
- },
727
- "domain_events_processed_idx": {
728
- "name": "domain_events_processed_idx",
729
- "columns": [
730
- {
731
- "expression": "processed_at",
732
- "isExpression": false,
733
- "asc": true,
734
- "nulls": "last"
735
- }
736
- ],
737
- "isUnique": false,
738
- "concurrently": false,
739
- "method": "btree",
740
- "with": {}
741
- },
742
- "domain_events_marketplace_idempotency_uq": {
743
- "name": "domain_events_marketplace_idempotency_uq",
744
- "columns": [
745
- {
746
- "expression": "marketplace_id",
747
- "isExpression": false,
748
- "asc": true,
749
- "nulls": "last"
750
- },
751
- {
752
- "expression": "idempotency_key",
753
- "isExpression": false,
754
- "asc": true,
755
- "nulls": "last"
756
- }
757
- ],
758
- "isUnique": true,
759
- "concurrently": false,
760
- "method": "btree",
761
- "with": {}
762
- }
763
- },
764
- "foreignKeys": {
765
- "domain_events_marketplace_id_marketplaces_id_fk": {
766
- "name": "domain_events_marketplace_id_marketplaces_id_fk",
767
- "tableFrom": "domain_events",
768
- "tableTo": "marketplaces",
769
- "columnsFrom": [
770
- "marketplace_id"
771
- ],
772
- "columnsTo": [
773
- "id"
774
- ],
775
- "onDelete": "cascade",
776
- "onUpdate": "no action"
777
- }
778
- },
779
- "compositePrimaryKeys": {},
780
- "uniqueConstraints": {},
781
- "policies": {},
782
- "checkConstraints": {},
783
- "isRLSEnabled": false
784
- },
785
- "public.flags": {
786
- "name": "flags",
787
- "schema": "",
788
- "columns": {
789
- "id": {
790
- "name": "id",
791
- "type": "text",
792
- "primaryKey": true,
793
- "notNull": true
794
- },
795
- "marketplace_id": {
796
- "name": "marketplace_id",
797
- "type": "text",
798
- "primaryKey": false,
799
- "notNull": true
800
- },
801
- "subject_type": {
802
- "name": "subject_type",
803
- "type": "text",
804
- "primaryKey": false,
805
- "notNull": true
806
- },
807
- "subject_id": {
808
- "name": "subject_id",
809
- "type": "text",
810
- "primaryKey": false,
811
- "notNull": true
812
- },
813
- "reporter_actor_id": {
814
- "name": "reporter_actor_id",
815
- "type": "text",
816
- "primaryKey": false,
817
- "notNull": false
818
- },
819
- "reason": {
820
- "name": "reason",
821
- "type": "text",
822
- "primaryKey": false,
823
- "notNull": false
824
- },
825
- "created_at": {
826
- "name": "created_at",
827
- "type": "timestamp with time zone",
828
- "primaryKey": false,
829
- "notNull": true,
830
- "default": "now()"
831
- }
832
- },
833
- "indexes": {
834
- "flags_marketplace_idx": {
835
- "name": "flags_marketplace_idx",
836
- "columns": [
837
- {
838
- "expression": "marketplace_id",
839
- "isExpression": false,
840
- "asc": true,
841
- "nulls": "last"
842
- }
843
- ],
844
- "isUnique": false,
845
- "concurrently": false,
846
- "method": "btree",
847
- "with": {}
848
- }
849
- },
850
- "foreignKeys": {
851
- "flags_marketplace_id_marketplaces_id_fk": {
852
- "name": "flags_marketplace_id_marketplaces_id_fk",
853
- "tableFrom": "flags",
854
- "tableTo": "marketplaces",
855
- "columnsFrom": [
856
- "marketplace_id"
857
- ],
858
- "columnsTo": [
859
- "id"
860
- ],
861
- "onDelete": "cascade",
862
- "onUpdate": "no action"
863
- },
864
- "flags_reporter_actor_id_actors_id_fk": {
865
- "name": "flags_reporter_actor_id_actors_id_fk",
866
- "tableFrom": "flags",
867
- "tableTo": "actors",
868
- "columnsFrom": [
869
- "reporter_actor_id"
870
- ],
871
- "columnsTo": [
872
- "id"
873
- ],
874
- "onDelete": "set null",
875
- "onUpdate": "no action"
876
- }
877
- },
878
- "compositePrimaryKeys": {},
879
- "uniqueConstraints": {},
880
- "policies": {},
881
- "checkConstraints": {},
882
- "isRLSEnabled": false
883
- },
884
- "public.fulfillments": {
885
- "name": "fulfillments",
886
- "schema": "",
887
- "columns": {
888
- "id": {
889
- "name": "id",
890
- "type": "text",
891
- "primaryKey": true,
892
- "notNull": true
893
- },
894
- "marketplace_id": {
895
- "name": "marketplace_id",
896
- "type": "text",
897
- "primaryKey": false,
898
- "notNull": true
899
- },
900
- "order_id": {
901
- "name": "order_id",
902
- "type": "text",
903
- "primaryKey": false,
904
- "notNull": true
905
- },
906
- "status": {
907
- "name": "status",
908
- "type": "text",
909
- "primaryKey": false,
910
- "notNull": true,
911
- "default": "'pending'"
912
- },
913
- "result": {
914
- "name": "result",
915
- "type": "jsonb",
916
- "primaryKey": false,
917
- "notNull": false
918
- },
919
- "confirmed_at": {
920
- "name": "confirmed_at",
921
- "type": "timestamp with time zone",
922
- "primaryKey": false,
923
- "notNull": false
924
- },
925
- "created_at": {
926
- "name": "created_at",
927
- "type": "timestamp with time zone",
928
- "primaryKey": false,
929
- "notNull": true,
930
- "default": "now()"
931
- },
932
- "updated_at": {
933
- "name": "updated_at",
934
- "type": "timestamp with time zone",
935
- "primaryKey": false,
936
- "notNull": true,
937
- "default": "now()"
938
- }
939
- },
940
- "indexes": {
941
- "fulfillments_order_uq": {
942
- "name": "fulfillments_order_uq",
943
- "columns": [
944
- {
945
- "expression": "order_id",
946
- "isExpression": false,
947
- "asc": true,
948
- "nulls": "last"
949
- }
950
- ],
951
- "isUnique": true,
952
- "concurrently": false,
953
- "method": "btree",
954
- "with": {}
955
- }
956
- },
957
- "foreignKeys": {
958
- "fulfillments_marketplace_id_marketplaces_id_fk": {
959
- "name": "fulfillments_marketplace_id_marketplaces_id_fk",
960
- "tableFrom": "fulfillments",
961
- "tableTo": "marketplaces",
962
- "columnsFrom": [
963
- "marketplace_id"
964
- ],
965
- "columnsTo": [
966
- "id"
967
- ],
968
- "onDelete": "cascade",
969
- "onUpdate": "no action"
970
- },
971
- "fulfillments_order_id_orders_id_fk": {
972
- "name": "fulfillments_order_id_orders_id_fk",
973
- "tableFrom": "fulfillments",
974
- "tableTo": "orders",
975
- "columnsFrom": [
976
- "order_id"
977
- ],
978
- "columnsTo": [
979
- "id"
980
- ],
981
- "onDelete": "cascade",
982
- "onUpdate": "no action"
983
- }
984
- },
985
- "compositePrimaryKeys": {},
986
- "uniqueConstraints": {},
987
- "policies": {},
988
- "checkConstraints": {},
989
- "isRLSEnabled": false
990
- },
991
- "public.integrations": {
992
- "name": "integrations",
993
- "schema": "",
994
- "columns": {
995
- "id": {
996
- "name": "id",
997
- "type": "text",
998
- "primaryKey": true,
999
- "notNull": true
1000
- },
1001
- "marketplace_id": {
1002
- "name": "marketplace_id",
1003
- "type": "text",
1004
- "primaryKey": false,
1005
- "notNull": true
1006
- },
1007
- "provider": {
1008
- "name": "provider",
1009
- "type": "text",
1010
- "primaryKey": false,
1011
- "notNull": true
1012
- },
1013
- "config": {
1014
- "name": "config",
1015
- "type": "jsonb",
1016
- "primaryKey": false,
1017
- "notNull": true
1018
- },
1019
- "created_at": {
1020
- "name": "created_at",
1021
- "type": "timestamp with time zone",
1022
- "primaryKey": false,
1023
- "notNull": true,
1024
- "default": "now()"
1025
- },
1026
- "updated_at": {
1027
- "name": "updated_at",
1028
- "type": "timestamp with time zone",
1029
- "primaryKey": false,
1030
- "notNull": true,
1031
- "default": "now()"
1032
- }
1033
- },
1034
- "indexes": {
1035
- "integrations_marketplace_provider_uq": {
1036
- "name": "integrations_marketplace_provider_uq",
1037
- "columns": [
1038
- {
1039
- "expression": "marketplace_id",
1040
- "isExpression": false,
1041
- "asc": true,
1042
- "nulls": "last"
1043
- },
1044
- {
1045
- "expression": "provider",
1046
- "isExpression": false,
1047
- "asc": true,
1048
- "nulls": "last"
1049
- }
1050
- ],
1051
- "isUnique": true,
1052
- "concurrently": false,
1053
- "method": "btree",
1054
- "with": {}
1055
- }
1056
- },
1057
- "foreignKeys": {
1058
- "integrations_marketplace_id_marketplaces_id_fk": {
1059
- "name": "integrations_marketplace_id_marketplaces_id_fk",
1060
- "tableFrom": "integrations",
1061
- "tableTo": "marketplaces",
1062
- "columnsFrom": [
1063
- "marketplace_id"
1064
- ],
1065
- "columnsTo": [
1066
- "id"
1067
- ],
1068
- "onDelete": "cascade",
1069
- "onUpdate": "no action"
1070
- }
1071
- },
1072
- "compositePrimaryKeys": {},
1073
- "uniqueConstraints": {},
1074
- "policies": {},
1075
- "checkConstraints": {},
1076
- "isRLSEnabled": false
1077
- },
1078
- "public.ledger_entries": {
1079
- "name": "ledger_entries",
1080
- "schema": "",
1081
- "columns": {
1082
- "id": {
1083
- "name": "id",
1084
- "type": "text",
1085
- "primaryKey": true,
1086
- "notNull": true
1087
- },
1088
- "marketplace_id": {
1089
- "name": "marketplace_id",
1090
- "type": "text",
1091
- "primaryKey": false,
1092
- "notNull": true
1093
- },
1094
- "order_id": {
1095
- "name": "order_id",
1096
- "type": "text",
1097
- "primaryKey": false,
1098
- "notNull": false
1099
- },
1100
- "settlement_id": {
1101
- "name": "settlement_id",
1102
- "type": "text",
1103
- "primaryKey": false,
1104
- "notNull": false
1105
- },
1106
- "kind": {
1107
- "name": "kind",
1108
- "type": "text",
1109
- "primaryKey": false,
1110
- "notNull": true
1111
- },
1112
- "amount_minor": {
1113
- "name": "amount_minor",
1114
- "type": "integer",
1115
- "primaryKey": false,
1116
- "notNull": true
1117
- },
1118
- "currency": {
1119
- "name": "currency",
1120
- "type": "text",
1121
- "primaryKey": false,
1122
- "notNull": true
1123
- },
1124
- "memo": {
1125
- "name": "memo",
1126
- "type": "text",
1127
- "primaryKey": false,
1128
- "notNull": false
1129
- },
1130
- "metadata": {
1131
- "name": "metadata",
1132
- "type": "jsonb",
1133
- "primaryKey": false,
1134
- "notNull": false
1135
- },
1136
- "created_at": {
1137
- "name": "created_at",
1138
- "type": "timestamp with time zone",
1139
- "primaryKey": false,
1140
- "notNull": true,
1141
- "default": "now()"
1142
- }
1143
- },
1144
- "indexes": {
1145
- "ledger_entries_marketplace_idx": {
1146
- "name": "ledger_entries_marketplace_idx",
1147
- "columns": [
1148
- {
1149
- "expression": "marketplace_id",
1150
- "isExpression": false,
1151
- "asc": true,
1152
- "nulls": "last"
1153
- }
1154
- ],
1155
- "isUnique": false,
1156
- "concurrently": false,
1157
- "method": "btree",
1158
- "with": {}
1159
- }
1160
- },
1161
- "foreignKeys": {
1162
- "ledger_entries_marketplace_id_marketplaces_id_fk": {
1163
- "name": "ledger_entries_marketplace_id_marketplaces_id_fk",
1164
- "tableFrom": "ledger_entries",
1165
- "tableTo": "marketplaces",
1166
- "columnsFrom": [
1167
- "marketplace_id"
1168
- ],
1169
- "columnsTo": [
1170
- "id"
1171
- ],
1172
- "onDelete": "cascade",
1173
- "onUpdate": "no action"
1174
- },
1175
- "ledger_entries_order_id_orders_id_fk": {
1176
- "name": "ledger_entries_order_id_orders_id_fk",
1177
- "tableFrom": "ledger_entries",
1178
- "tableTo": "orders",
1179
- "columnsFrom": [
1180
- "order_id"
1181
- ],
1182
- "columnsTo": [
1183
- "id"
1184
- ],
1185
- "onDelete": "set null",
1186
- "onUpdate": "no action"
1187
- },
1188
- "ledger_entries_settlement_id_settlements_id_fk": {
1189
- "name": "ledger_entries_settlement_id_settlements_id_fk",
1190
- "tableFrom": "ledger_entries",
1191
- "tableTo": "settlements",
1192
- "columnsFrom": [
1193
- "settlement_id"
1194
- ],
1195
- "columnsTo": [
1196
- "id"
1197
- ],
1198
- "onDelete": "set null",
1199
- "onUpdate": "no action"
1200
- }
1201
- },
1202
- "compositePrimaryKeys": {},
1203
- "uniqueConstraints": {},
1204
- "policies": {},
1205
- "checkConstraints": {},
1206
- "isRLSEnabled": false
1207
- },
1208
- "public.listing_assets": {
1209
- "name": "listing_assets",
1210
- "schema": "",
1211
- "columns": {
1212
- "id": {
1213
- "name": "id",
1214
- "type": "text",
1215
- "primaryKey": true,
1216
- "notNull": true
1217
- },
1218
- "listing_version_id": {
1219
- "name": "listing_version_id",
1220
- "type": "text",
1221
- "primaryKey": false,
1222
- "notNull": true
1223
- },
1224
- "url": {
1225
- "name": "url",
1226
- "type": "text",
1227
- "primaryKey": false,
1228
- "notNull": true
1229
- },
1230
- "kind": {
1231
- "name": "kind",
1232
- "type": "text",
1233
- "primaryKey": false,
1234
- "notNull": true
1235
- },
1236
- "metadata": {
1237
- "name": "metadata",
1238
- "type": "jsonb",
1239
- "primaryKey": false,
1240
- "notNull": false
1241
- }
1242
- },
1243
- "indexes": {
1244
- "listing_assets_version_idx": {
1245
- "name": "listing_assets_version_idx",
1246
- "columns": [
1247
- {
1248
- "expression": "listing_version_id",
1249
- "isExpression": false,
1250
- "asc": true,
1251
- "nulls": "last"
1252
- }
1253
- ],
1254
- "isUnique": false,
1255
- "concurrently": false,
1256
- "method": "btree",
1257
- "with": {}
1258
- }
1259
- },
1260
- "foreignKeys": {
1261
- "listing_assets_listing_version_id_listing_versions_id_fk": {
1262
- "name": "listing_assets_listing_version_id_listing_versions_id_fk",
1263
- "tableFrom": "listing_assets",
1264
- "tableTo": "listing_versions",
1265
- "columnsFrom": [
1266
- "listing_version_id"
1267
- ],
1268
- "columnsTo": [
1269
- "id"
1270
- ],
1271
- "onDelete": "cascade",
1272
- "onUpdate": "no action"
1273
- }
1274
- },
1275
- "compositePrimaryKeys": {},
1276
- "uniqueConstraints": {},
1277
- "policies": {},
1278
- "checkConstraints": {},
1279
- "isRLSEnabled": false
1280
- },
1281
- "public.listing_types": {
1282
- "name": "listing_types",
1283
- "schema": "",
1284
- "columns": {
1285
- "id": {
1286
- "name": "id",
1287
- "type": "text",
1288
- "primaryKey": true,
1289
- "notNull": true
1290
- },
1291
- "marketplace_id": {
1292
- "name": "marketplace_id",
1293
- "type": "text",
1294
- "primaryKey": false,
1295
- "notNull": true
1296
- },
1297
- "slug": {
1298
- "name": "slug",
1299
- "type": "text",
1300
- "primaryKey": false,
1301
- "notNull": true
1302
- },
1303
- "name": {
1304
- "name": "name",
1305
- "type": "text",
1306
- "primaryKey": false,
1307
- "notNull": true
1308
- },
1309
- "schema": {
1310
- "name": "schema",
1311
- "type": "jsonb",
1312
- "primaryKey": false,
1313
- "notNull": false
1314
- },
1315
- "created_at": {
1316
- "name": "created_at",
1317
- "type": "timestamp with time zone",
1318
- "primaryKey": false,
1319
- "notNull": true,
1320
- "default": "now()"
1321
- }
1322
- },
1323
- "indexes": {
1324
- "listing_types_marketplace_slug_uq": {
1325
- "name": "listing_types_marketplace_slug_uq",
1326
- "columns": [
1327
- {
1328
- "expression": "marketplace_id",
1329
- "isExpression": false,
1330
- "asc": true,
1331
- "nulls": "last"
1332
- },
1333
- {
1334
- "expression": "slug",
1335
- "isExpression": false,
1336
- "asc": true,
1337
- "nulls": "last"
1338
- }
1339
- ],
1340
- "isUnique": true,
1341
- "concurrently": false,
1342
- "method": "btree",
1343
- "with": {}
1344
- }
1345
- },
1346
- "foreignKeys": {
1347
- "listing_types_marketplace_id_marketplaces_id_fk": {
1348
- "name": "listing_types_marketplace_id_marketplaces_id_fk",
1349
- "tableFrom": "listing_types",
1350
- "tableTo": "marketplaces",
1351
- "columnsFrom": [
1352
- "marketplace_id"
1353
- ],
1354
- "columnsTo": [
1355
- "id"
1356
- ],
1357
- "onDelete": "cascade",
1358
- "onUpdate": "no action"
1359
- }
1360
- },
1361
- "compositePrimaryKeys": {},
1362
- "uniqueConstraints": {},
1363
- "policies": {},
1364
- "checkConstraints": {},
1365
- "isRLSEnabled": false
1366
- },
1367
- "public.listing_versions": {
1368
- "name": "listing_versions",
1369
- "schema": "",
1370
- "columns": {
1371
- "id": {
1372
- "name": "id",
1373
- "type": "text",
1374
- "primaryKey": true,
1375
- "notNull": true
1376
- },
1377
- "listing_id": {
1378
- "name": "listing_id",
1379
- "type": "text",
1380
- "primaryKey": false,
1381
- "notNull": true
1382
- },
1383
- "version": {
1384
- "name": "version",
1385
- "type": "integer",
1386
- "primaryKey": false,
1387
- "notNull": true
1388
- },
1389
- "title": {
1390
- "name": "title",
1391
- "type": "text",
1392
- "primaryKey": false,
1393
- "notNull": true
1394
- },
1395
- "description": {
1396
- "name": "description",
1397
- "type": "text",
1398
- "primaryKey": false,
1399
- "notNull": false
1400
- },
1401
- "price_amount_minor": {
1402
- "name": "price_amount_minor",
1403
- "type": "integer",
1404
- "primaryKey": false,
1405
- "notNull": false
1406
- },
1407
- "price_currency": {
1408
- "name": "price_currency",
1409
- "type": "text",
1410
- "primaryKey": false,
1411
- "notNull": false
1412
- },
1413
- "metadata": {
1414
- "name": "metadata",
1415
- "type": "jsonb",
1416
- "primaryKey": false,
1417
- "notNull": false
1418
- },
1419
- "created_at": {
1420
- "name": "created_at",
1421
- "type": "timestamp with time zone",
1422
- "primaryKey": false,
1423
- "notNull": true,
1424
- "default": "now()"
1425
- }
1426
- },
1427
- "indexes": {
1428
- "listing_versions_listing_version_uq": {
1429
- "name": "listing_versions_listing_version_uq",
1430
- "columns": [
1431
- {
1432
- "expression": "listing_id",
1433
- "isExpression": false,
1434
- "asc": true,
1435
- "nulls": "last"
1436
- },
1437
- {
1438
- "expression": "version",
1439
- "isExpression": false,
1440
- "asc": true,
1441
- "nulls": "last"
1442
- }
1443
- ],
1444
- "isUnique": true,
1445
- "concurrently": false,
1446
- "method": "btree",
1447
- "with": {}
1448
- }
1449
- },
1450
- "foreignKeys": {
1451
- "listing_versions_listing_id_listings_id_fk": {
1452
- "name": "listing_versions_listing_id_listings_id_fk",
1453
- "tableFrom": "listing_versions",
1454
- "tableTo": "listings",
1455
- "columnsFrom": [
1456
- "listing_id"
1457
- ],
1458
- "columnsTo": [
1459
- "id"
1460
- ],
1461
- "onDelete": "cascade",
1462
- "onUpdate": "no action"
1463
- }
1464
- },
1465
- "compositePrimaryKeys": {},
1466
- "uniqueConstraints": {},
1467
- "policies": {},
1468
- "checkConstraints": {},
1469
- "isRLSEnabled": false
1470
- },
1471
- "public.listings": {
1472
- "name": "listings",
1473
- "schema": "",
1474
- "columns": {
1475
- "id": {
1476
- "name": "id",
1477
- "type": "text",
1478
- "primaryKey": true,
1479
- "notNull": true
1480
- },
1481
- "marketplace_id": {
1482
- "name": "marketplace_id",
1483
- "type": "text",
1484
- "primaryKey": false,
1485
- "notNull": true
1486
- },
1487
- "actor_id": {
1488
- "name": "actor_id",
1489
- "type": "text",
1490
- "primaryKey": false,
1491
- "notNull": true
1492
- },
1493
- "listing_type_id": {
1494
- "name": "listing_type_id",
1495
- "type": "text",
1496
- "primaryKey": false,
1497
- "notNull": true
1498
- },
1499
- "current_version_id": {
1500
- "name": "current_version_id",
1501
- "type": "text",
1502
- "primaryKey": false,
1503
- "notNull": false
1504
- },
1505
- "status": {
1506
- "name": "status",
1507
- "type": "text",
1508
- "primaryKey": false,
1509
- "notNull": true,
1510
- "default": "'draft'"
1511
- },
1512
- "created_at": {
1513
- "name": "created_at",
1514
- "type": "timestamp with time zone",
1515
- "primaryKey": false,
1516
- "notNull": true,
1517
- "default": "now()"
1518
- },
1519
- "updated_at": {
1520
- "name": "updated_at",
1521
- "type": "timestamp with time zone",
1522
- "primaryKey": false,
1523
- "notNull": true,
1524
- "default": "now()"
1525
- }
1526
- },
1527
- "indexes": {
1528
- "listings_marketplace_idx": {
1529
- "name": "listings_marketplace_idx",
1530
- "columns": [
1531
- {
1532
- "expression": "marketplace_id",
1533
- "isExpression": false,
1534
- "asc": true,
1535
- "nulls": "last"
1536
- }
1537
- ],
1538
- "isUnique": false,
1539
- "concurrently": false,
1540
- "method": "btree",
1541
- "with": {}
1542
- }
1543
- },
1544
- "foreignKeys": {
1545
- "listings_marketplace_id_marketplaces_id_fk": {
1546
- "name": "listings_marketplace_id_marketplaces_id_fk",
1547
- "tableFrom": "listings",
1548
- "tableTo": "marketplaces",
1549
- "columnsFrom": [
1550
- "marketplace_id"
1551
- ],
1552
- "columnsTo": [
1553
- "id"
1554
- ],
1555
- "onDelete": "cascade",
1556
- "onUpdate": "no action"
1557
- },
1558
- "listings_actor_id_actors_id_fk": {
1559
- "name": "listings_actor_id_actors_id_fk",
1560
- "tableFrom": "listings",
1561
- "tableTo": "actors",
1562
- "columnsFrom": [
1563
- "actor_id"
1564
- ],
1565
- "columnsTo": [
1566
- "id"
1567
- ],
1568
- "onDelete": "cascade",
1569
- "onUpdate": "no action"
1570
- },
1571
- "listings_listing_type_id_listing_types_id_fk": {
1572
- "name": "listings_listing_type_id_listing_types_id_fk",
1573
- "tableFrom": "listings",
1574
- "tableTo": "listing_types",
1575
- "columnsFrom": [
1576
- "listing_type_id"
1577
- ],
1578
- "columnsTo": [
1579
- "id"
1580
- ],
1581
- "onDelete": "restrict",
1582
- "onUpdate": "no action"
1583
- }
1584
- },
1585
- "compositePrimaryKeys": {},
1586
- "uniqueConstraints": {},
1587
- "policies": {},
1588
- "checkConstraints": {},
1589
- "isRLSEnabled": false
1590
- },
1591
- "public.marketplaces": {
1592
- "name": "marketplaces",
1593
- "schema": "",
1594
- "columns": {
1595
- "id": {
1596
- "name": "id",
1597
- "type": "text",
1598
- "primaryKey": true,
1599
- "notNull": true
1600
- },
1601
- "name": {
1602
- "name": "name",
1603
- "type": "text",
1604
- "primaryKey": false,
1605
- "notNull": true
1606
- },
1607
- "slug": {
1608
- "name": "slug",
1609
- "type": "text",
1610
- "primaryKey": false,
1611
- "notNull": true
1612
- },
1613
- "owner_id": {
1614
- "name": "owner_id",
1615
- "type": "text",
1616
- "primaryKey": false,
1617
- "notNull": false
1618
- },
1619
- "created_at": {
1620
- "name": "created_at",
1621
- "type": "timestamp with time zone",
1622
- "primaryKey": false,
1623
- "notNull": true,
1624
- "default": "now()"
1625
- },
1626
- "updated_at": {
1627
- "name": "updated_at",
1628
- "type": "timestamp with time zone",
1629
- "primaryKey": false,
1630
- "notNull": true,
1631
- "default": "now()"
1632
- }
1633
- },
1634
- "indexes": {
1635
- "marketplaces_slug_uq": {
1636
- "name": "marketplaces_slug_uq",
1637
- "columns": [
1638
- {
1639
- "expression": "slug",
1640
- "isExpression": false,
1641
- "asc": true,
1642
- "nulls": "last"
1643
- }
1644
- ],
1645
- "isUnique": true,
1646
- "concurrently": false,
1647
- "method": "btree",
1648
- "with": {}
1649
- }
1650
- },
1651
- "foreignKeys": {
1652
- "marketplaces_owner_id_admin_users_id_fk": {
1653
- "name": "marketplaces_owner_id_admin_users_id_fk",
1654
- "tableFrom": "marketplaces",
1655
- "tableTo": "admin_users",
1656
- "columnsFrom": [
1657
- "owner_id"
1658
- ],
1659
- "columnsTo": [
1660
- "id"
1661
- ],
1662
- "onDelete": "set null",
1663
- "onUpdate": "no action"
1664
- }
1665
- },
1666
- "compositePrimaryKeys": {},
1667
- "uniqueConstraints": {},
1668
- "policies": {},
1669
- "checkConstraints": {},
1670
- "isRLSEnabled": false
1671
- },
1672
- "public.moderation_cases": {
1673
- "name": "moderation_cases",
1674
- "schema": "",
1675
- "columns": {
1676
- "id": {
1677
- "name": "id",
1678
- "type": "text",
1679
- "primaryKey": true,
1680
- "notNull": true
1681
- },
1682
- "marketplace_id": {
1683
- "name": "marketplace_id",
1684
- "type": "text",
1685
- "primaryKey": false,
1686
- "notNull": true
1687
- },
1688
- "subject_type": {
1689
- "name": "subject_type",
1690
- "type": "text",
1691
- "primaryKey": false,
1692
- "notNull": true
1693
- },
1694
- "subject_id": {
1695
- "name": "subject_id",
1696
- "type": "text",
1697
- "primaryKey": false,
1698
- "notNull": true
1699
- },
1700
- "status": {
1701
- "name": "status",
1702
- "type": "text",
1703
- "primaryKey": false,
1704
- "notNull": true,
1705
- "default": "'open'"
1706
- },
1707
- "notes": {
1708
- "name": "notes",
1709
- "type": "text",
1710
- "primaryKey": false,
1711
- "notNull": false
1712
- },
1713
- "created_at": {
1714
- "name": "created_at",
1715
- "type": "timestamp with time zone",
1716
- "primaryKey": false,
1717
- "notNull": true,
1718
- "default": "now()"
1719
- },
1720
- "updated_at": {
1721
- "name": "updated_at",
1722
- "type": "timestamp with time zone",
1723
- "primaryKey": false,
1724
- "notNull": true,
1725
- "default": "now()"
1726
- }
1727
- },
1728
- "indexes": {
1729
- "moderation_cases_marketplace_idx": {
1730
- "name": "moderation_cases_marketplace_idx",
1731
- "columns": [
1732
- {
1733
- "expression": "marketplace_id",
1734
- "isExpression": false,
1735
- "asc": true,
1736
- "nulls": "last"
1737
- }
1738
- ],
1739
- "isUnique": false,
1740
- "concurrently": false,
1741
- "method": "btree",
1742
- "with": {}
1743
- }
1744
- },
1745
- "foreignKeys": {
1746
- "moderation_cases_marketplace_id_marketplaces_id_fk": {
1747
- "name": "moderation_cases_marketplace_id_marketplaces_id_fk",
1748
- "tableFrom": "moderation_cases",
1749
- "tableTo": "marketplaces",
1750
- "columnsFrom": [
1751
- "marketplace_id"
1752
- ],
1753
- "columnsTo": [
1754
- "id"
1755
- ],
1756
- "onDelete": "cascade",
1757
- "onUpdate": "no action"
1758
- }
1759
- },
1760
- "compositePrimaryKeys": {},
1761
- "uniqueConstraints": {},
1762
- "policies": {},
1763
- "checkConstraints": {},
1764
- "isRLSEnabled": false
1765
- },
1766
- "public.offers": {
1767
- "name": "offers",
1768
- "schema": "",
1769
- "columns": {
1770
- "id": {
1771
- "name": "id",
1772
- "type": "text",
1773
- "primaryKey": true,
1774
- "notNull": true
1775
- },
1776
- "marketplace_id": {
1777
- "name": "marketplace_id",
1778
- "type": "text",
1779
- "primaryKey": false,
1780
- "notNull": true
1781
- },
1782
- "listing_id": {
1783
- "name": "listing_id",
1784
- "type": "text",
1785
- "primaryKey": false,
1786
- "notNull": true
1787
- },
1788
- "buyer_actor_id": {
1789
- "name": "buyer_actor_id",
1790
- "type": "text",
1791
- "primaryKey": false,
1792
- "notNull": true
1793
- },
1794
- "status": {
1795
- "name": "status",
1796
- "type": "text",
1797
- "primaryKey": false,
1798
- "notNull": true,
1799
- "default": "'open'"
1800
- },
1801
- "proposed_price_amount_minor": {
1802
- "name": "proposed_price_amount_minor",
1803
- "type": "integer",
1804
- "primaryKey": false,
1805
- "notNull": false
1806
- },
1807
- "proposed_price_currency": {
1808
- "name": "proposed_price_currency",
1809
- "type": "text",
1810
- "primaryKey": false,
1811
- "notNull": false
1812
- },
1813
- "metadata": {
1814
- "name": "metadata",
1815
- "type": "jsonb",
1816
- "primaryKey": false,
1817
- "notNull": false
1818
- },
1819
- "created_at": {
1820
- "name": "created_at",
1821
- "type": "timestamp with time zone",
1822
- "primaryKey": false,
1823
- "notNull": true,
1824
- "default": "now()"
1825
- },
1826
- "updated_at": {
1827
- "name": "updated_at",
1828
- "type": "timestamp with time zone",
1829
- "primaryKey": false,
1830
- "notNull": true,
1831
- "default": "now()"
1832
- }
1833
- },
1834
- "indexes": {
1835
- "offers_marketplace_idx": {
1836
- "name": "offers_marketplace_idx",
1837
- "columns": [
1838
- {
1839
- "expression": "marketplace_id",
1840
- "isExpression": false,
1841
- "asc": true,
1842
- "nulls": "last"
1843
- }
1844
- ],
1845
- "isUnique": false,
1846
- "concurrently": false,
1847
- "method": "btree",
1848
- "with": {}
1849
- }
1850
- },
1851
- "foreignKeys": {
1852
- "offers_marketplace_id_marketplaces_id_fk": {
1853
- "name": "offers_marketplace_id_marketplaces_id_fk",
1854
- "tableFrom": "offers",
1855
- "tableTo": "marketplaces",
1856
- "columnsFrom": [
1857
- "marketplace_id"
1858
- ],
1859
- "columnsTo": [
1860
- "id"
1861
- ],
1862
- "onDelete": "cascade",
1863
- "onUpdate": "no action"
1864
- },
1865
- "offers_listing_id_listings_id_fk": {
1866
- "name": "offers_listing_id_listings_id_fk",
1867
- "tableFrom": "offers",
1868
- "tableTo": "listings",
1869
- "columnsFrom": [
1870
- "listing_id"
1871
- ],
1872
- "columnsTo": [
1873
- "id"
1874
- ],
1875
- "onDelete": "cascade",
1876
- "onUpdate": "no action"
1877
- },
1878
- "offers_buyer_actor_id_actors_id_fk": {
1879
- "name": "offers_buyer_actor_id_actors_id_fk",
1880
- "tableFrom": "offers",
1881
- "tableTo": "actors",
1882
- "columnsFrom": [
1883
- "buyer_actor_id"
1884
- ],
1885
- "columnsTo": [
1886
- "id"
1887
- ],
1888
- "onDelete": "cascade",
1889
- "onUpdate": "no action"
1890
- }
1891
- },
1892
- "compositePrimaryKeys": {},
1893
- "uniqueConstraints": {},
1894
- "policies": {},
1895
- "checkConstraints": {},
1896
- "isRLSEnabled": false
1897
- },
1898
- "public.order_items": {
1899
- "name": "order_items",
1900
- "schema": "",
1901
- "columns": {
1902
- "id": {
1903
- "name": "id",
1904
- "type": "text",
1905
- "primaryKey": true,
1906
- "notNull": true
1907
- },
1908
- "order_id": {
1909
- "name": "order_id",
1910
- "type": "text",
1911
- "primaryKey": false,
1912
- "notNull": true
1913
- },
1914
- "listing_version_id": {
1915
- "name": "listing_version_id",
1916
- "type": "text",
1917
- "primaryKey": false,
1918
- "notNull": true
1919
- },
1920
- "quantity": {
1921
- "name": "quantity",
1922
- "type": "integer",
1923
- "primaryKey": false,
1924
- "notNull": true,
1925
- "default": 1
1926
- },
1927
- "unit_amount_minor": {
1928
- "name": "unit_amount_minor",
1929
- "type": "integer",
1930
- "primaryKey": false,
1931
- "notNull": true
1932
- },
1933
- "unit_currency": {
1934
- "name": "unit_currency",
1935
- "type": "text",
1936
- "primaryKey": false,
1937
- "notNull": true
1938
- },
1939
- "metadata": {
1940
- "name": "metadata",
1941
- "type": "jsonb",
1942
- "primaryKey": false,
1943
- "notNull": false
1944
- }
1945
- },
1946
- "indexes": {
1947
- "order_items_order_idx": {
1948
- "name": "order_items_order_idx",
1949
- "columns": [
1950
- {
1951
- "expression": "order_id",
1952
- "isExpression": false,
1953
- "asc": true,
1954
- "nulls": "last"
1955
- }
1956
- ],
1957
- "isUnique": false,
1958
- "concurrently": false,
1959
- "method": "btree",
1960
- "with": {}
1961
- }
1962
- },
1963
- "foreignKeys": {
1964
- "order_items_order_id_orders_id_fk": {
1965
- "name": "order_items_order_id_orders_id_fk",
1966
- "tableFrom": "order_items",
1967
- "tableTo": "orders",
1968
- "columnsFrom": [
1969
- "order_id"
1970
- ],
1971
- "columnsTo": [
1972
- "id"
1973
- ],
1974
- "onDelete": "cascade",
1975
- "onUpdate": "no action"
1976
- },
1977
- "order_items_listing_version_id_listing_versions_id_fk": {
1978
- "name": "order_items_listing_version_id_listing_versions_id_fk",
1979
- "tableFrom": "order_items",
1980
- "tableTo": "listing_versions",
1981
- "columnsFrom": [
1982
- "listing_version_id"
1983
- ],
1984
- "columnsTo": [
1985
- "id"
1986
- ],
1987
- "onDelete": "restrict",
1988
- "onUpdate": "no action"
1989
- }
1990
- },
1991
- "compositePrimaryKeys": {},
1992
- "uniqueConstraints": {},
1993
- "policies": {},
1994
- "checkConstraints": {},
1995
- "isRLSEnabled": false
1996
- },
1997
- "public.orders": {
1998
- "name": "orders",
1999
- "schema": "",
2000
- "columns": {
2001
- "id": {
2002
- "name": "id",
2003
- "type": "text",
2004
- "primaryKey": true,
2005
- "notNull": true
2006
- },
2007
- "qtx_id": {
2008
- "name": "qtx_id",
2009
- "type": "text",
2010
- "primaryKey": false,
2011
- "notNull": true
2012
- },
2013
- "marketplace_id": {
2014
- "name": "marketplace_id",
2015
- "type": "text",
2016
- "primaryKey": false,
2017
- "notNull": true
2018
- },
2019
- "buyer_actor_id": {
2020
- "name": "buyer_actor_id",
2021
- "type": "text",
2022
- "primaryKey": false,
2023
- "notNull": true
2024
- },
2025
- "seller_actor_id": {
2026
- "name": "seller_actor_id",
2027
- "type": "text",
2028
- "primaryKey": false,
2029
- "notNull": true
2030
- },
2031
- "listing_id": {
2032
- "name": "listing_id",
2033
- "type": "text",
2034
- "primaryKey": false,
2035
- "notNull": true
2036
- },
2037
- "offer_id": {
2038
- "name": "offer_id",
2039
- "type": "text",
2040
- "primaryKey": false,
2041
- "notNull": false
2042
- },
2043
- "status": {
2044
- "name": "status",
2045
- "type": "text",
2046
- "primaryKey": false,
2047
- "notNull": true,
2048
- "default": "'created'"
2049
- },
2050
- "total_amount_minor": {
2051
- "name": "total_amount_minor",
2052
- "type": "integer",
2053
- "primaryKey": false,
2054
- "notNull": true
2055
- },
2056
- "total_currency": {
2057
- "name": "total_currency",
2058
- "type": "text",
2059
- "primaryKey": false,
2060
- "notNull": true
2061
- },
2062
- "metadata": {
2063
- "name": "metadata",
2064
- "type": "jsonb",
2065
- "primaryKey": false,
2066
- "notNull": false
2067
- },
2068
- "created_at": {
2069
- "name": "created_at",
2070
- "type": "timestamp with time zone",
2071
- "primaryKey": false,
2072
- "notNull": true,
2073
- "default": "now()"
2074
- },
2075
- "updated_at": {
2076
- "name": "updated_at",
2077
- "type": "timestamp with time zone",
2078
- "primaryKey": false,
2079
- "notNull": true,
2080
- "default": "now()"
2081
- }
2082
- },
2083
- "indexes": {
2084
- "orders_marketplace_idx": {
2085
- "name": "orders_marketplace_idx",
2086
- "columns": [
2087
- {
2088
- "expression": "marketplace_id",
2089
- "isExpression": false,
2090
- "asc": true,
2091
- "nulls": "last"
2092
- }
2093
- ],
2094
- "isUnique": false,
2095
- "concurrently": false,
2096
- "method": "btree",
2097
- "with": {}
2098
- },
2099
- "orders_qtx_uq": {
2100
- "name": "orders_qtx_uq",
2101
- "columns": [
2102
- {
2103
- "expression": "qtx_id",
2104
- "isExpression": false,
2105
- "asc": true,
2106
- "nulls": "last"
2107
- }
2108
- ],
2109
- "isUnique": true,
2110
- "concurrently": false,
2111
- "method": "btree",
2112
- "with": {}
2113
- }
2114
- },
2115
- "foreignKeys": {
2116
- "orders_marketplace_id_marketplaces_id_fk": {
2117
- "name": "orders_marketplace_id_marketplaces_id_fk",
2118
- "tableFrom": "orders",
2119
- "tableTo": "marketplaces",
2120
- "columnsFrom": [
2121
- "marketplace_id"
2122
- ],
2123
- "columnsTo": [
2124
- "id"
2125
- ],
2126
- "onDelete": "cascade",
2127
- "onUpdate": "no action"
2128
- },
2129
- "orders_buyer_actor_id_actors_id_fk": {
2130
- "name": "orders_buyer_actor_id_actors_id_fk",
2131
- "tableFrom": "orders",
2132
- "tableTo": "actors",
2133
- "columnsFrom": [
2134
- "buyer_actor_id"
2135
- ],
2136
- "columnsTo": [
2137
- "id"
2138
- ],
2139
- "onDelete": "cascade",
2140
- "onUpdate": "no action"
2141
- },
2142
- "orders_seller_actor_id_actors_id_fk": {
2143
- "name": "orders_seller_actor_id_actors_id_fk",
2144
- "tableFrom": "orders",
2145
- "tableTo": "actors",
2146
- "columnsFrom": [
2147
- "seller_actor_id"
2148
- ],
2149
- "columnsTo": [
2150
- "id"
2151
- ],
2152
- "onDelete": "cascade",
2153
- "onUpdate": "no action"
2154
- },
2155
- "orders_listing_id_listings_id_fk": {
2156
- "name": "orders_listing_id_listings_id_fk",
2157
- "tableFrom": "orders",
2158
- "tableTo": "listings",
2159
- "columnsFrom": [
2160
- "listing_id"
2161
- ],
2162
- "columnsTo": [
2163
- "id"
2164
- ],
2165
- "onDelete": "restrict",
2166
- "onUpdate": "no action"
2167
- },
2168
- "orders_offer_id_offers_id_fk": {
2169
- "name": "orders_offer_id_offers_id_fk",
2170
- "tableFrom": "orders",
2171
- "tableTo": "offers",
2172
- "columnsFrom": [
2173
- "offer_id"
2174
- ],
2175
- "columnsTo": [
2176
- "id"
2177
- ],
2178
- "onDelete": "set null",
2179
- "onUpdate": "no action"
2180
- }
2181
- },
2182
- "compositePrimaryKeys": {},
2183
- "uniqueConstraints": {},
2184
- "policies": {},
2185
- "checkConstraints": {},
2186
- "isRLSEnabled": false
2187
- },
2188
- "public.payment_challenges": {
2189
- "name": "payment_challenges",
2190
- "schema": "",
2191
- "columns": {
2192
- "id": {
2193
- "name": "id",
2194
- "type": "text",
2195
- "primaryKey": true,
2196
- "notNull": true
2197
- },
2198
- "marketplace_id": {
2199
- "name": "marketplace_id",
2200
- "type": "text",
2201
- "primaryKey": false,
2202
- "notNull": true
2203
- },
2204
- "order_id": {
2205
- "name": "order_id",
2206
- "type": "text",
2207
- "primaryKey": false,
2208
- "notNull": true
2209
- },
2210
- "status": {
2211
- "name": "status",
2212
- "type": "text",
2213
- "primaryKey": false,
2214
- "notNull": true,
2215
- "default": "'pending'"
2216
- },
2217
- "rail": {
2218
- "name": "rail",
2219
- "type": "text",
2220
- "primaryKey": false,
2221
- "notNull": true
2222
- },
2223
- "challenge_payload": {
2224
- "name": "challenge_payload",
2225
- "type": "jsonb",
2226
- "primaryKey": false,
2227
- "notNull": true
2228
- },
2229
- "expires_at": {
2230
- "name": "expires_at",
2231
- "type": "timestamp with time zone",
2232
- "primaryKey": false,
2233
- "notNull": false
2234
- },
2235
- "created_at": {
2236
- "name": "created_at",
2237
- "type": "timestamp with time zone",
2238
- "primaryKey": false,
2239
- "notNull": true,
2240
- "default": "now()"
2241
- },
2242
- "updated_at": {
2243
- "name": "updated_at",
2244
- "type": "timestamp with time zone",
2245
- "primaryKey": false,
2246
- "notNull": true,
2247
- "default": "now()"
2248
- }
2249
- },
2250
- "indexes": {
2251
- "payment_challenges_order_idx": {
2252
- "name": "payment_challenges_order_idx",
2253
- "columns": [
2254
- {
2255
- "expression": "order_id",
2256
- "isExpression": false,
2257
- "asc": true,
2258
- "nulls": "last"
2259
- }
2260
- ],
2261
- "isUnique": false,
2262
- "concurrently": false,
2263
- "method": "btree",
2264
- "with": {}
2265
- }
2266
- },
2267
- "foreignKeys": {
2268
- "payment_challenges_marketplace_id_marketplaces_id_fk": {
2269
- "name": "payment_challenges_marketplace_id_marketplaces_id_fk",
2270
- "tableFrom": "payment_challenges",
2271
- "tableTo": "marketplaces",
2272
- "columnsFrom": [
2273
- "marketplace_id"
2274
- ],
2275
- "columnsTo": [
2276
- "id"
2277
- ],
2278
- "onDelete": "cascade",
2279
- "onUpdate": "no action"
2280
- },
2281
- "payment_challenges_order_id_orders_id_fk": {
2282
- "name": "payment_challenges_order_id_orders_id_fk",
2283
- "tableFrom": "payment_challenges",
2284
- "tableTo": "orders",
2285
- "columnsFrom": [
2286
- "order_id"
2287
- ],
2288
- "columnsTo": [
2289
- "id"
2290
- ],
2291
- "onDelete": "cascade",
2292
- "onUpdate": "no action"
2293
- }
2294
- },
2295
- "compositePrimaryKeys": {},
2296
- "uniqueConstraints": {},
2297
- "policies": {},
2298
- "checkConstraints": {},
2299
- "isRLSEnabled": false
2300
- },
2301
- "public.payment_receipts": {
2302
- "name": "payment_receipts",
2303
- "schema": "",
2304
- "columns": {
2305
- "id": {
2306
- "name": "id",
2307
- "type": "text",
2308
- "primaryKey": true,
2309
- "notNull": true
2310
- },
2311
- "qtx_id": {
2312
- "name": "qtx_id",
2313
- "type": "text",
2314
- "primaryKey": false,
2315
- "notNull": true
2316
- },
2317
- "marketplace_id": {
2318
- "name": "marketplace_id",
2319
- "type": "text",
2320
- "primaryKey": false,
2321
- "notNull": true
2322
- },
2323
- "order_id": {
2324
- "name": "order_id",
2325
- "type": "text",
2326
- "primaryKey": false,
2327
- "notNull": true
2328
- },
2329
- "challenge_id": {
2330
- "name": "challenge_id",
2331
- "type": "text",
2332
- "primaryKey": false,
2333
- "notNull": true
2334
- },
2335
- "rail": {
2336
- "name": "rail",
2337
- "type": "text",
2338
- "primaryKey": false,
2339
- "notNull": true
2340
- },
2341
- "qhash": {
2342
- "name": "qhash",
2343
- "type": "text",
2344
- "primaryKey": false,
2345
- "notNull": false
2346
- },
2347
- "receipt_payload": {
2348
- "name": "receipt_payload",
2349
- "type": "jsonb",
2350
- "primaryKey": false,
2351
- "notNull": true
2352
- },
2353
- "verified_at": {
2354
- "name": "verified_at",
2355
- "type": "timestamp with time zone",
2356
- "primaryKey": false,
2357
- "notNull": true
2358
- },
2359
- "created_at": {
2360
- "name": "created_at",
2361
- "type": "timestamp with time zone",
2362
- "primaryKey": false,
2363
- "notNull": true,
2364
- "default": "now()"
2365
- }
2366
- },
2367
- "indexes": {
2368
- "payment_receipts_order_idx": {
2369
- "name": "payment_receipts_order_idx",
2370
- "columns": [
2371
- {
2372
- "expression": "order_id",
2373
- "isExpression": false,
2374
- "asc": true,
2375
- "nulls": "last"
2376
- }
2377
- ],
2378
- "isUnique": false,
2379
- "concurrently": false,
2380
- "method": "btree",
2381
- "with": {}
2382
- },
2383
- "payment_receipts_challenge_uq": {
2384
- "name": "payment_receipts_challenge_uq",
2385
- "columns": [
2386
- {
2387
- "expression": "challenge_id",
2388
- "isExpression": false,
2389
- "asc": true,
2390
- "nulls": "last"
2391
- }
2392
- ],
2393
- "isUnique": true,
2394
- "concurrently": false,
2395
- "method": "btree",
2396
- "with": {}
2397
- },
2398
- "payment_receipts_qhash_uq": {
2399
- "name": "payment_receipts_qhash_uq",
2400
- "columns": [
2401
- {
2402
- "expression": "qhash",
2403
- "isExpression": false,
2404
- "asc": true,
2405
- "nulls": "last"
2406
- }
2407
- ],
2408
- "isUnique": true,
2409
- "concurrently": false,
2410
- "method": "btree",
2411
- "with": {}
2412
- },
2413
- "payment_receipts_qtx_idx": {
2414
- "name": "payment_receipts_qtx_idx",
2415
- "columns": [
2416
- {
2417
- "expression": "qtx_id",
2418
- "isExpression": false,
2419
- "asc": true,
2420
- "nulls": "last"
2421
- }
2422
- ],
2423
- "isUnique": false,
2424
- "concurrently": false,
2425
- "method": "btree",
2426
- "with": {}
2427
- }
2428
- },
2429
- "foreignKeys": {
2430
- "payment_receipts_marketplace_id_marketplaces_id_fk": {
2431
- "name": "payment_receipts_marketplace_id_marketplaces_id_fk",
2432
- "tableFrom": "payment_receipts",
2433
- "tableTo": "marketplaces",
2434
- "columnsFrom": [
2435
- "marketplace_id"
2436
- ],
2437
- "columnsTo": [
2438
- "id"
2439
- ],
2440
- "onDelete": "cascade",
2441
- "onUpdate": "no action"
2442
- },
2443
- "payment_receipts_order_id_orders_id_fk": {
2444
- "name": "payment_receipts_order_id_orders_id_fk",
2445
- "tableFrom": "payment_receipts",
2446
- "tableTo": "orders",
2447
- "columnsFrom": [
2448
- "order_id"
2449
- ],
2450
- "columnsTo": [
2451
- "id"
2452
- ],
2453
- "onDelete": "cascade",
2454
- "onUpdate": "no action"
2455
- },
2456
- "payment_receipts_challenge_id_payment_challenges_id_fk": {
2457
- "name": "payment_receipts_challenge_id_payment_challenges_id_fk",
2458
- "tableFrom": "payment_receipts",
2459
- "tableTo": "payment_challenges",
2460
- "columnsFrom": [
2461
- "challenge_id"
2462
- ],
2463
- "columnsTo": [
2464
- "id"
2465
- ],
2466
- "onDelete": "cascade",
2467
- "onUpdate": "no action"
2468
- }
2469
- },
2470
- "compositePrimaryKeys": {},
2471
- "uniqueConstraints": {},
2472
- "policies": {},
2473
- "checkConstraints": {},
2474
- "isRLSEnabled": false
2475
- },
2476
- "public.request_idempotency": {
2477
- "name": "request_idempotency",
2478
- "schema": "",
2479
- "columns": {
2480
- "id": {
2481
- "name": "id",
2482
- "type": "text",
2483
- "primaryKey": true,
2484
- "notNull": true
2485
- },
2486
- "marketplace_id": {
2487
- "name": "marketplace_id",
2488
- "type": "text",
2489
- "primaryKey": false,
2490
- "notNull": true
2491
- },
2492
- "idempotency_key": {
2493
- "name": "idempotency_key",
2494
- "type": "text",
2495
- "primaryKey": false,
2496
- "notNull": true
2497
- },
2498
- "operation": {
2499
- "name": "operation",
2500
- "type": "text",
2501
- "primaryKey": false,
2502
- "notNull": true
2503
- },
2504
- "request_fingerprint": {
2505
- "name": "request_fingerprint",
2506
- "type": "text",
2507
- "primaryKey": false,
2508
- "notNull": true
2509
- },
2510
- "response_status": {
2511
- "name": "response_status",
2512
- "type": "integer",
2513
- "primaryKey": false,
2514
- "notNull": true
2515
- },
2516
- "response_body": {
2517
- "name": "response_body",
2518
- "type": "jsonb",
2519
- "primaryKey": false,
2520
- "notNull": true
2521
- },
2522
- "created_at": {
2523
- "name": "created_at",
2524
- "type": "timestamp with time zone",
2525
- "primaryKey": false,
2526
- "notNull": true,
2527
- "default": "now()"
2528
- },
2529
- "updated_at": {
2530
- "name": "updated_at",
2531
- "type": "timestamp with time zone",
2532
- "primaryKey": false,
2533
- "notNull": true,
2534
- "default": "now()"
2535
- }
2536
- },
2537
- "indexes": {
2538
- "request_idempotency_marketplace_key_operation_uq": {
2539
- "name": "request_idempotency_marketplace_key_operation_uq",
2540
- "columns": [
2541
- {
2542
- "expression": "marketplace_id",
2543
- "isExpression": false,
2544
- "asc": true,
2545
- "nulls": "last"
2546
- },
2547
- {
2548
- "expression": "idempotency_key",
2549
- "isExpression": false,
2550
- "asc": true,
2551
- "nulls": "last"
2552
- },
2553
- {
2554
- "expression": "operation",
2555
- "isExpression": false,
2556
- "asc": true,
2557
- "nulls": "last"
2558
- }
2559
- ],
2560
- "isUnique": true,
2561
- "concurrently": false,
2562
- "method": "btree",
2563
- "with": {}
2564
- }
2565
- },
2566
- "foreignKeys": {
2567
- "request_idempotency_marketplace_id_marketplaces_id_fk": {
2568
- "name": "request_idempotency_marketplace_id_marketplaces_id_fk",
2569
- "tableFrom": "request_idempotency",
2570
- "tableTo": "marketplaces",
2571
- "columnsFrom": [
2572
- "marketplace_id"
2573
- ],
2574
- "columnsTo": [
2575
- "id"
2576
- ],
2577
- "onDelete": "cascade",
2578
- "onUpdate": "no action"
2579
- }
2580
- },
2581
- "compositePrimaryKeys": {},
2582
- "uniqueConstraints": {},
2583
- "policies": {},
2584
- "checkConstraints": {},
2585
- "isRLSEnabled": false
2586
- },
2587
- "public.reviews": {
2588
- "name": "reviews",
2589
- "schema": "",
2590
- "columns": {
2591
- "id": {
2592
- "name": "id",
2593
- "type": "text",
2594
- "primaryKey": true,
2595
- "notNull": true
2596
- },
2597
- "marketplace_id": {
2598
- "name": "marketplace_id",
2599
- "type": "text",
2600
- "primaryKey": false,
2601
- "notNull": true
2602
- },
2603
- "order_id": {
2604
- "name": "order_id",
2605
- "type": "text",
2606
- "primaryKey": false,
2607
- "notNull": true
2608
- },
2609
- "reviewer_actor_id": {
2610
- "name": "reviewer_actor_id",
2611
- "type": "text",
2612
- "primaryKey": false,
2613
- "notNull": true
2614
- },
2615
- "rating": {
2616
- "name": "rating",
2617
- "type": "integer",
2618
- "primaryKey": false,
2619
- "notNull": true
2620
- },
2621
- "comment": {
2622
- "name": "comment",
2623
- "type": "text",
2624
- "primaryKey": false,
2625
- "notNull": false
2626
- },
2627
- "created_at": {
2628
- "name": "created_at",
2629
- "type": "timestamp with time zone",
2630
- "primaryKey": false,
2631
- "notNull": true,
2632
- "default": "now()"
2633
- }
2634
- },
2635
- "indexes": {
2636
- "reviews_order_reviewer_uq": {
2637
- "name": "reviews_order_reviewer_uq",
2638
- "columns": [
2639
- {
2640
- "expression": "order_id",
2641
- "isExpression": false,
2642
- "asc": true,
2643
- "nulls": "last"
2644
- },
2645
- {
2646
- "expression": "reviewer_actor_id",
2647
- "isExpression": false,
2648
- "asc": true,
2649
- "nulls": "last"
2650
- }
2651
- ],
2652
- "isUnique": true,
2653
- "concurrently": false,
2654
- "method": "btree",
2655
- "with": {}
2656
- }
2657
- },
2658
- "foreignKeys": {
2659
- "reviews_marketplace_id_marketplaces_id_fk": {
2660
- "name": "reviews_marketplace_id_marketplaces_id_fk",
2661
- "tableFrom": "reviews",
2662
- "tableTo": "marketplaces",
2663
- "columnsFrom": [
2664
- "marketplace_id"
2665
- ],
2666
- "columnsTo": [
2667
- "id"
2668
- ],
2669
- "onDelete": "cascade",
2670
- "onUpdate": "no action"
2671
- },
2672
- "reviews_order_id_orders_id_fk": {
2673
- "name": "reviews_order_id_orders_id_fk",
2674
- "tableFrom": "reviews",
2675
- "tableTo": "orders",
2676
- "columnsFrom": [
2677
- "order_id"
2678
- ],
2679
- "columnsTo": [
2680
- "id"
2681
- ],
2682
- "onDelete": "cascade",
2683
- "onUpdate": "no action"
2684
- },
2685
- "reviews_reviewer_actor_id_actors_id_fk": {
2686
- "name": "reviews_reviewer_actor_id_actors_id_fk",
2687
- "tableFrom": "reviews",
2688
- "tableTo": "actors",
2689
- "columnsFrom": [
2690
- "reviewer_actor_id"
2691
- ],
2692
- "columnsTo": [
2693
- "id"
2694
- ],
2695
- "onDelete": "cascade",
2696
- "onUpdate": "no action"
2697
- }
2698
- },
2699
- "compositePrimaryKeys": {},
2700
- "uniqueConstraints": {},
2701
- "policies": {},
2702
- "checkConstraints": {},
2703
- "isRLSEnabled": false
2704
- },
2705
- "public.settlement_rules": {
2706
- "name": "settlement_rules",
2707
- "schema": "",
2708
- "columns": {
2709
- "id": {
2710
- "name": "id",
2711
- "type": "text",
2712
- "primaryKey": true,
2713
- "notNull": true
2714
- },
2715
- "marketplace_id": {
2716
- "name": "marketplace_id",
2717
- "type": "text",
2718
- "primaryKey": false,
2719
- "notNull": true
2720
- },
2721
- "name": {
2722
- "name": "name",
2723
- "type": "text",
2724
- "primaryKey": false,
2725
- "notNull": true
2726
- },
2727
- "rules": {
2728
- "name": "rules",
2729
- "type": "jsonb",
2730
- "primaryKey": false,
2731
- "notNull": true
2732
- },
2733
- "created_at": {
2734
- "name": "created_at",
2735
- "type": "timestamp with time zone",
2736
- "primaryKey": false,
2737
- "notNull": true,
2738
- "default": "now()"
2739
- }
2740
- },
2741
- "indexes": {
2742
- "settlement_rules_marketplace_idx": {
2743
- "name": "settlement_rules_marketplace_idx",
2744
- "columns": [
2745
- {
2746
- "expression": "marketplace_id",
2747
- "isExpression": false,
2748
- "asc": true,
2749
- "nulls": "last"
2750
- }
2751
- ],
2752
- "isUnique": false,
2753
- "concurrently": false,
2754
- "method": "btree",
2755
- "with": {}
2756
- }
2757
- },
2758
- "foreignKeys": {
2759
- "settlement_rules_marketplace_id_marketplaces_id_fk": {
2760
- "name": "settlement_rules_marketplace_id_marketplaces_id_fk",
2761
- "tableFrom": "settlement_rules",
2762
- "tableTo": "marketplaces",
2763
- "columnsFrom": [
2764
- "marketplace_id"
2765
- ],
2766
- "columnsTo": [
2767
- "id"
2768
- ],
2769
- "onDelete": "cascade",
2770
- "onUpdate": "no action"
2771
- }
2772
- },
2773
- "compositePrimaryKeys": {},
2774
- "uniqueConstraints": {},
2775
- "policies": {},
2776
- "checkConstraints": {},
2777
- "isRLSEnabled": false
2778
- },
2779
- "public.settlements": {
2780
- "name": "settlements",
2781
- "schema": "",
2782
- "columns": {
2783
- "id": {
2784
- "name": "id",
2785
- "type": "text",
2786
- "primaryKey": true,
2787
- "notNull": true
2788
- },
2789
- "qtx_id": {
2790
- "name": "qtx_id",
2791
- "type": "text",
2792
- "primaryKey": false,
2793
- "notNull": true
2794
- },
2795
- "marketplace_id": {
2796
- "name": "marketplace_id",
2797
- "type": "text",
2798
- "primaryKey": false,
2799
- "notNull": true
2800
- },
2801
- "order_id": {
2802
- "name": "order_id",
2803
- "type": "text",
2804
- "primaryKey": false,
2805
- "notNull": true
2806
- },
2807
- "status": {
2808
- "name": "status",
2809
- "type": "text",
2810
- "primaryKey": false,
2811
- "notNull": true,
2812
- "default": "'pending'"
2813
- },
2814
- "amount_minor": {
2815
- "name": "amount_minor",
2816
- "type": "integer",
2817
- "primaryKey": false,
2818
- "notNull": true
2819
- },
2820
- "currency": {
2821
- "name": "currency",
2822
- "type": "text",
2823
- "primaryKey": false,
2824
- "notNull": true
2825
- },
2826
- "metadata": {
2827
- "name": "metadata",
2828
- "type": "jsonb",
2829
- "primaryKey": false,
2830
- "notNull": false
2831
- },
2832
- "created_at": {
2833
- "name": "created_at",
2834
- "type": "timestamp with time zone",
2835
- "primaryKey": false,
2836
- "notNull": true,
2837
- "default": "now()"
2838
- },
2839
- "updated_at": {
2840
- "name": "updated_at",
2841
- "type": "timestamp with time zone",
2842
- "primaryKey": false,
2843
- "notNull": true,
2844
- "default": "now()"
2845
- }
2846
- },
2847
- "indexes": {
2848
- "settlements_order_idx": {
2849
- "name": "settlements_order_idx",
2850
- "columns": [
2851
- {
2852
- "expression": "order_id",
2853
- "isExpression": false,
2854
- "asc": true,
2855
- "nulls": "last"
2856
- }
2857
- ],
2858
- "isUnique": false,
2859
- "concurrently": false,
2860
- "method": "btree",
2861
- "with": {}
2862
- }
2863
- },
2864
- "foreignKeys": {
2865
- "settlements_marketplace_id_marketplaces_id_fk": {
2866
- "name": "settlements_marketplace_id_marketplaces_id_fk",
2867
- "tableFrom": "settlements",
2868
- "tableTo": "marketplaces",
2869
- "columnsFrom": [
2870
- "marketplace_id"
2871
- ],
2872
- "columnsTo": [
2873
- "id"
2874
- ],
2875
- "onDelete": "cascade",
2876
- "onUpdate": "no action"
2877
- },
2878
- "settlements_order_id_orders_id_fk": {
2879
- "name": "settlements_order_id_orders_id_fk",
2880
- "tableFrom": "settlements",
2881
- "tableTo": "orders",
2882
- "columnsFrom": [
2883
- "order_id"
2884
- ],
2885
- "columnsTo": [
2886
- "id"
2887
- ],
2888
- "onDelete": "cascade",
2889
- "onUpdate": "no action"
2890
- }
2891
- },
2892
- "compositePrimaryKeys": {},
2893
- "uniqueConstraints": {},
2894
- "policies": {},
2895
- "checkConstraints": {},
2896
- "isRLSEnabled": false
2897
- },
2898
- "public.webhook_deliveries": {
2899
- "name": "webhook_deliveries",
2900
- "schema": "",
2901
- "columns": {
2902
- "id": {
2903
- "name": "id",
2904
- "type": "text",
2905
- "primaryKey": true,
2906
- "notNull": true
2907
- },
2908
- "subscription_id": {
2909
- "name": "subscription_id",
2910
- "type": "text",
2911
- "primaryKey": false,
2912
- "notNull": true
2913
- },
2914
- "event_id": {
2915
- "name": "event_id",
2916
- "type": "text",
2917
- "primaryKey": false,
2918
- "notNull": true
2919
- },
2920
- "status": {
2921
- "name": "status",
2922
- "type": "text",
2923
- "primaryKey": false,
2924
- "notNull": true,
2925
- "default": "'pending'"
2926
- },
2927
- "attempts": {
2928
- "name": "attempts",
2929
- "type": "integer",
2930
- "primaryKey": false,
2931
- "notNull": true,
2932
- "default": 0
2933
- },
2934
- "response_status": {
2935
- "name": "response_status",
2936
- "type": "integer",
2937
- "primaryKey": false,
2938
- "notNull": false
2939
- },
2940
- "last_error": {
2941
- "name": "last_error",
2942
- "type": "text",
2943
- "primaryKey": false,
2944
- "notNull": false
2945
- },
2946
- "next_attempt_at": {
2947
- "name": "next_attempt_at",
2948
- "type": "timestamp with time zone",
2949
- "primaryKey": false,
2950
- "notNull": false
2951
- },
2952
- "dead_lettered_at": {
2953
- "name": "dead_lettered_at",
2954
- "type": "timestamp with time zone",
2955
- "primaryKey": false,
2956
- "notNull": false
2957
- },
2958
- "created_at": {
2959
- "name": "created_at",
2960
- "type": "timestamp with time zone",
2961
- "primaryKey": false,
2962
- "notNull": true,
2963
- "default": "now()"
2964
- },
2965
- "updated_at": {
2966
- "name": "updated_at",
2967
- "type": "timestamp with time zone",
2968
- "primaryKey": false,
2969
- "notNull": true,
2970
- "default": "now()"
2971
- }
2972
- },
2973
- "indexes": {
2974
- "webhook_deliveries_status_idx": {
2975
- "name": "webhook_deliveries_status_idx",
2976
- "columns": [
2977
- {
2978
- "expression": "status",
2979
- "isExpression": false,
2980
- "asc": true,
2981
- "nulls": "last"
2982
- }
2983
- ],
2984
- "isUnique": false,
2985
- "concurrently": false,
2986
- "method": "btree",
2987
- "with": {}
2988
- },
2989
- "webhook_deliveries_next_attempt_idx": {
2990
- "name": "webhook_deliveries_next_attempt_idx",
2991
- "columns": [
2992
- {
2993
- "expression": "next_attempt_at",
2994
- "isExpression": false,
2995
- "asc": true,
2996
- "nulls": "last"
2997
- }
2998
- ],
2999
- "isUnique": false,
3000
- "concurrently": false,
3001
- "method": "btree",
3002
- "with": {}
3003
- }
3004
- },
3005
- "foreignKeys": {
3006
- "webhook_deliveries_subscription_id_webhook_subscriptions_id_fk": {
3007
- "name": "webhook_deliveries_subscription_id_webhook_subscriptions_id_fk",
3008
- "tableFrom": "webhook_deliveries",
3009
- "tableTo": "webhook_subscriptions",
3010
- "columnsFrom": [
3011
- "subscription_id"
3012
- ],
3013
- "columnsTo": [
3014
- "id"
3015
- ],
3016
- "onDelete": "cascade",
3017
- "onUpdate": "no action"
3018
- },
3019
- "webhook_deliveries_event_id_domain_events_id_fk": {
3020
- "name": "webhook_deliveries_event_id_domain_events_id_fk",
3021
- "tableFrom": "webhook_deliveries",
3022
- "tableTo": "domain_events",
3023
- "columnsFrom": [
3024
- "event_id"
3025
- ],
3026
- "columnsTo": [
3027
- "id"
3028
- ],
3029
- "onDelete": "cascade",
3030
- "onUpdate": "no action"
3031
- }
3032
- },
3033
- "compositePrimaryKeys": {},
3034
- "uniqueConstraints": {},
3035
- "policies": {},
3036
- "checkConstraints": {},
3037
- "isRLSEnabled": false
3038
- },
3039
- "public.webhook_subscriptions": {
3040
- "name": "webhook_subscriptions",
3041
- "schema": "",
3042
- "columns": {
3043
- "id": {
3044
- "name": "id",
3045
- "type": "text",
3046
- "primaryKey": true,
3047
- "notNull": true
3048
- },
3049
- "marketplace_id": {
3050
- "name": "marketplace_id",
3051
- "type": "text",
3052
- "primaryKey": false,
3053
- "notNull": true
3054
- },
3055
- "url": {
3056
- "name": "url",
3057
- "type": "text",
3058
- "primaryKey": false,
3059
- "notNull": true
3060
- },
3061
- "secret": {
3062
- "name": "secret",
3063
- "type": "text",
3064
- "primaryKey": false,
3065
- "notNull": true
3066
- },
3067
- "event_types": {
3068
- "name": "event_types",
3069
- "type": "jsonb",
3070
- "primaryKey": false,
3071
- "notNull": false
3072
- },
3073
- "created_at": {
3074
- "name": "created_at",
3075
- "type": "timestamp with time zone",
3076
- "primaryKey": false,
3077
- "notNull": true,
3078
- "default": "now()"
3079
- }
3080
- },
3081
- "indexes": {
3082
- "webhook_subscriptions_marketplace_idx": {
3083
- "name": "webhook_subscriptions_marketplace_idx",
3084
- "columns": [
3085
- {
3086
- "expression": "marketplace_id",
3087
- "isExpression": false,
3088
- "asc": true,
3089
- "nulls": "last"
3090
- }
3091
- ],
3092
- "isUnique": false,
3093
- "concurrently": false,
3094
- "method": "btree",
3095
- "with": {}
3096
- }
3097
- },
3098
- "foreignKeys": {
3099
- "webhook_subscriptions_marketplace_id_marketplaces_id_fk": {
3100
- "name": "webhook_subscriptions_marketplace_id_marketplaces_id_fk",
3101
- "tableFrom": "webhook_subscriptions",
3102
- "tableTo": "marketplaces",
3103
- "columnsFrom": [
3104
- "marketplace_id"
3105
- ],
3106
- "columnsTo": [
3107
- "id"
3108
- ],
3109
- "onDelete": "cascade",
3110
- "onUpdate": "no action"
3111
- }
3112
- },
3113
- "compositePrimaryKeys": {},
3114
- "uniqueConstraints": {},
3115
- "policies": {},
3116
- "checkConstraints": {},
3117
- "isRLSEnabled": false
3118
- }
3119
- },
3120
- "enums": {},
3121
- "schemas": {},
3122
- "sequences": {},
3123
- "roles": {},
3124
- "policies": {},
3125
- "views": {},
3126
- "_meta": {
3127
- "columns": {},
3128
- "schemas": {},
3129
- "tables": {}
3130
- }
3131
- }