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