@openora/core 0.4.1-canary.124 → 0.4.1-canary.126

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.
Files changed (92) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/audit/__tests__/map-event.test.js +83 -0
  3. package/dist/audit/__tests__/map-event.test.js.map +1 -1
  4. package/dist/audit/plugin.d.ts.map +1 -1
  5. package/dist/audit/plugin.js +47 -0
  6. package/dist/audit/plugin.js.map +1 -1
  7. package/dist/contracts/adapters/index.d.ts +1 -1
  8. package/dist/contracts/adapters/index.d.ts.map +1 -1
  9. package/dist/contracts/adapters/index.js +1 -1
  10. package/dist/contracts/adapters/index.js.map +1 -1
  11. package/dist/contracts/adapters/realtime.d.ts +22 -5
  12. package/dist/contracts/adapters/realtime.d.ts.map +1 -1
  13. package/dist/contracts/adapters/realtime.js +7 -0
  14. package/dist/contracts/adapters/realtime.js.map +1 -1
  15. package/dist/contracts/schemas/events.d.ts +46 -0
  16. package/dist/contracts/schemas/events.d.ts.map +1 -1
  17. package/dist/contracts/schemas/events.js +34 -0
  18. package/dist/contracts/schemas/events.js.map +1 -1
  19. package/dist/engagement/chat/__tests__/chat.service.int.test.js +13 -1
  20. package/dist/engagement/chat/__tests__/chat.service.int.test.js.map +1 -1
  21. package/dist/engagement/chat/__tests__/room-ownership-handover.int.test.d.ts +2 -0
  22. package/dist/engagement/chat/__tests__/room-ownership-handover.int.test.d.ts.map +1 -0
  23. package/dist/engagement/chat/__tests__/room-ownership-handover.int.test.js +736 -0
  24. package/dist/engagement/chat/__tests__/room-ownership-handover.int.test.js.map +1 -0
  25. package/dist/engagement/chat/contract/constants.d.ts +2 -0
  26. package/dist/engagement/chat/contract/constants.d.ts.map +1 -1
  27. package/dist/engagement/chat/contract/constants.js +3 -1
  28. package/dist/engagement/chat/contract/constants.js.map +1 -1
  29. package/dist/engagement/chat/contract/index.d.ts +21 -0
  30. package/dist/engagement/chat/contract/index.d.ts.map +1 -1
  31. package/dist/engagement/chat/contract/index.js +7 -0
  32. package/dist/engagement/chat/contract/index.js.map +1 -1
  33. package/dist/engagement/chat/drizzle/migrations/0012_strange_mephisto.sql +3 -0
  34. package/dist/engagement/chat/drizzle/migrations/0013_chilly_sprite.sql +6 -0
  35. package/dist/engagement/chat/drizzle/migrations/meta/0012_snapshot.json +1517 -0
  36. package/dist/engagement/chat/drizzle/migrations/meta/0013_snapshot.json +1517 -0
  37. package/dist/engagement/chat/drizzle/migrations/meta/_journal.json +14 -0
  38. package/dist/engagement/chat/plugin.d.ts +2 -1
  39. package/dist/engagement/chat/plugin.d.ts.map +1 -1
  40. package/dist/engagement/chat/plugin.js +138 -3
  41. package/dist/engagement/chat/plugin.js.map +1 -1
  42. package/dist/engagement/chat/router/index.d.ts +13 -0
  43. package/dist/engagement/chat/router/index.d.ts.map +1 -1
  44. package/dist/engagement/chat/schema/index.d.ts +34 -0
  45. package/dist/engagement/chat/schema/index.d.ts.map +1 -1
  46. package/dist/engagement/chat/schema/index.js +7 -2
  47. package/dist/engagement/chat/schema/index.js.map +1 -1
  48. package/dist/engagement/chat/service/chat-room-ban.service.d.ts.map +1 -1
  49. package/dist/engagement/chat/service/chat-room-ban.service.js +11 -9
  50. package/dist/engagement/chat/service/chat-room-ban.service.js.map +1 -1
  51. package/dist/engagement/chat/service/chat-room-membership.service.d.ts +23 -3
  52. package/dist/engagement/chat/service/chat-room-membership.service.d.ts.map +1 -1
  53. package/dist/engagement/chat/service/chat-room-membership.service.js +280 -12
  54. package/dist/engagement/chat/service/chat-room-membership.service.js.map +1 -1
  55. package/dist/engagement/chat/service/chat-room-purge.service.d.ts +13 -0
  56. package/dist/engagement/chat/service/chat-room-purge.service.d.ts.map +1 -0
  57. package/dist/engagement/chat/service/chat-room-purge.service.js +75 -0
  58. package/dist/engagement/chat/service/chat-room-purge.service.js.map +1 -0
  59. package/dist/engagement/chat/service/chat.service.d.ts +19 -8
  60. package/dist/engagement/chat/service/chat.service.d.ts.map +1 -1
  61. package/dist/engagement/chat/service/chat.service.js +9 -3
  62. package/dist/engagement/chat/service/chat.service.js.map +1 -1
  63. package/dist/engagement/notifications/__tests__/chat-room-notifications.int.test.d.ts +2 -0
  64. package/dist/engagement/notifications/__tests__/chat-room-notifications.int.test.d.ts.map +1 -0
  65. package/dist/engagement/notifications/__tests__/chat-room-notifications.int.test.js +187 -0
  66. package/dist/engagement/notifications/__tests__/chat-room-notifications.int.test.js.map +1 -0
  67. package/dist/engagement/notifications/__tests__/notification-event-map.test.js +35 -1
  68. package/dist/engagement/notifications/__tests__/notification-event-map.test.js.map +1 -1
  69. package/dist/engagement/notifications/contract/index.d.ts +11 -3
  70. package/dist/engagement/notifications/contract/index.d.ts.map +1 -1
  71. package/dist/engagement/notifications/contract/index.js +2 -0
  72. package/dist/engagement/notifications/contract/index.js.map +1 -1
  73. package/dist/engagement/notifications/plugin.d.ts +5 -0
  74. package/dist/engagement/notifications/plugin.d.ts.map +1 -1
  75. package/dist/engagement/notifications/plugin.js +46 -0
  76. package/dist/engagement/notifications/plugin.js.map +1 -1
  77. package/dist/engagement/notifications/router/index.d.ts +4 -2
  78. package/dist/engagement/notifications/router/index.d.ts.map +1 -1
  79. package/dist/fx/exchange-rate/__tests__/exchange-rate-reader.service.int.test.js +4 -3
  80. package/dist/fx/exchange-rate/__tests__/exchange-rate-reader.service.int.test.js.map +1 -1
  81. package/dist/pam/player-management/__tests__/player.service.int.test.js +50 -0
  82. package/dist/pam/player-management/__tests__/player.service.int.test.js.map +1 -1
  83. package/dist/pam/player-management/service/player.service.d.ts.map +1 -1
  84. package/dist/pam/player-management/service/player.service.js +19 -0
  85. package/dist/pam/player-management/service/player.service.js.map +1 -1
  86. package/dist/server/kernel/__tests__/redis-pubsub-realtime-transport.int.test.js +33 -0
  87. package/dist/server/kernel/__tests__/redis-pubsub-realtime-transport.int.test.js.map +1 -1
  88. package/dist/server/kernel/redis-pubsub-realtime-transport.d.ts +10 -2
  89. package/dist/server/kernel/redis-pubsub-realtime-transport.d.ts.map +1 -1
  90. package/dist/server/kernel/redis-pubsub-realtime-transport.js +0 -0
  91. package/dist/server/kernel/redis-pubsub-realtime-transport.js.map +1 -1
  92. package/package.json +1 -1
@@ -0,0 +1,1517 @@
1
+ {
2
+ "id": "7e3baeea-fa65-4287-8461-53b82798a270",
3
+ "prevId": "1416988b-f7d3-4953-a048-6a3e5857a58f",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.chat_message": {
8
+ "name": "chat_message",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "room_id": {
19
+ "name": "room_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": false
23
+ },
24
+ "user_id": {
25
+ "name": "user_id",
26
+ "type": "uuid",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "username": {
31
+ "name": "username",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "content": {
37
+ "name": "content",
38
+ "type": "text",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "type": {
43
+ "name": "type",
44
+ "type": "chat_message_type",
45
+ "typeSchema": "public",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "'user'"
49
+ },
50
+ "metadata": {
51
+ "name": "metadata",
52
+ "type": "jsonb",
53
+ "primaryKey": false,
54
+ "notNull": false
55
+ },
56
+ "attachment": {
57
+ "name": "attachment",
58
+ "type": "jsonb",
59
+ "primaryKey": false,
60
+ "notNull": false
61
+ },
62
+ "is_deleted": {
63
+ "name": "is_deleted",
64
+ "type": "boolean",
65
+ "primaryKey": false,
66
+ "notNull": true,
67
+ "default": false
68
+ },
69
+ "deleted_at": {
70
+ "name": "deleted_at",
71
+ "type": "timestamp with time zone",
72
+ "primaryKey": false,
73
+ "notNull": false
74
+ },
75
+ "created_at": {
76
+ "name": "created_at",
77
+ "type": "timestamp with time zone",
78
+ "primaryKey": false,
79
+ "notNull": true,
80
+ "default": "now()"
81
+ }
82
+ },
83
+ "indexes": {
84
+ "chat_msg_room_id_created_at_idx": {
85
+ "name": "chat_msg_room_id_created_at_idx",
86
+ "columns": [
87
+ {
88
+ "expression": "room_id",
89
+ "isExpression": false,
90
+ "asc": true,
91
+ "nulls": "last"
92
+ },
93
+ {
94
+ "expression": "created_at",
95
+ "isExpression": false,
96
+ "asc": true,
97
+ "nulls": "last"
98
+ }
99
+ ],
100
+ "isUnique": false,
101
+ "concurrently": false,
102
+ "method": "btree",
103
+ "with": {}
104
+ },
105
+ "chat_msg_created_at_idx": {
106
+ "name": "chat_msg_created_at_idx",
107
+ "columns": [
108
+ {
109
+ "expression": "created_at",
110
+ "isExpression": false,
111
+ "asc": true,
112
+ "nulls": "last"
113
+ }
114
+ ],
115
+ "isUnique": false,
116
+ "concurrently": false,
117
+ "method": "btree",
118
+ "with": {}
119
+ },
120
+ "chat_msg_deleted_at_idx": {
121
+ "name": "chat_msg_deleted_at_idx",
122
+ "columns": [
123
+ {
124
+ "expression": "deleted_at",
125
+ "isExpression": false,
126
+ "asc": true,
127
+ "nulls": "last"
128
+ }
129
+ ],
130
+ "isUnique": false,
131
+ "concurrently": false,
132
+ "method": "btree",
133
+ "with": {}
134
+ },
135
+ "chat_msg_user_id_created_at_idx": {
136
+ "name": "chat_msg_user_id_created_at_idx",
137
+ "columns": [
138
+ {
139
+ "expression": "user_id",
140
+ "isExpression": false,
141
+ "asc": true,
142
+ "nulls": "last"
143
+ },
144
+ {
145
+ "expression": "created_at",
146
+ "isExpression": false,
147
+ "asc": true,
148
+ "nulls": "last"
149
+ }
150
+ ],
151
+ "isUnique": false,
152
+ "concurrently": false,
153
+ "method": "btree",
154
+ "with": {}
155
+ }
156
+ },
157
+ "foreignKeys": {
158
+ "chat_message_room_id_chat_room_id_fk": {
159
+ "name": "chat_message_room_id_chat_room_id_fk",
160
+ "tableFrom": "chat_message",
161
+ "tableTo": "chat_room",
162
+ "columnsFrom": ["room_id"],
163
+ "columnsTo": ["id"],
164
+ "onDelete": "no action",
165
+ "onUpdate": "no action"
166
+ }
167
+ },
168
+ "compositePrimaryKeys": {},
169
+ "uniqueConstraints": {},
170
+ "policies": {},
171
+ "checkConstraints": {},
172
+ "isRLSEnabled": false
173
+ },
174
+ "public.chat_mute": {
175
+ "name": "chat_mute",
176
+ "schema": "",
177
+ "columns": {
178
+ "id": {
179
+ "name": "id",
180
+ "type": "uuid",
181
+ "primaryKey": true,
182
+ "notNull": true,
183
+ "default": "gen_random_uuid()"
184
+ },
185
+ "user_id": {
186
+ "name": "user_id",
187
+ "type": "uuid",
188
+ "primaryKey": false,
189
+ "notNull": true
190
+ },
191
+ "room_id": {
192
+ "name": "room_id",
193
+ "type": "uuid",
194
+ "primaryKey": false,
195
+ "notNull": false
196
+ },
197
+ "scope": {
198
+ "name": "scope",
199
+ "type": "chat_moderation_scope",
200
+ "typeSchema": "public",
201
+ "primaryKey": false,
202
+ "notNull": true,
203
+ "default": "'__global'"
204
+ },
205
+ "muted_by": {
206
+ "name": "muted_by",
207
+ "type": "uuid",
208
+ "primaryKey": false,
209
+ "notNull": true
210
+ },
211
+ "reason": {
212
+ "name": "reason",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": true
216
+ },
217
+ "created_at": {
218
+ "name": "created_at",
219
+ "type": "timestamp with time zone",
220
+ "primaryKey": false,
221
+ "notNull": true,
222
+ "default": "now()"
223
+ },
224
+ "expires_at": {
225
+ "name": "expires_at",
226
+ "type": "timestamp with time zone",
227
+ "primaryKey": false,
228
+ "notNull": false
229
+ },
230
+ "lifted_at": {
231
+ "name": "lifted_at",
232
+ "type": "timestamp with time zone",
233
+ "primaryKey": false,
234
+ "notNull": false
235
+ },
236
+ "lifted_by": {
237
+ "name": "lifted_by",
238
+ "type": "uuid",
239
+ "primaryKey": false,
240
+ "notNull": false
241
+ }
242
+ },
243
+ "indexes": {
244
+ "chat_mute_user_room_idx": {
245
+ "name": "chat_mute_user_room_idx",
246
+ "columns": [
247
+ {
248
+ "expression": "user_id",
249
+ "isExpression": false,
250
+ "asc": true,
251
+ "nulls": "last"
252
+ },
253
+ {
254
+ "expression": "room_id",
255
+ "isExpression": false,
256
+ "asc": true,
257
+ "nulls": "last"
258
+ }
259
+ ],
260
+ "isUnique": false,
261
+ "concurrently": false,
262
+ "method": "btree",
263
+ "with": {}
264
+ },
265
+ "chat_mute_expires_at_idx": {
266
+ "name": "chat_mute_expires_at_idx",
267
+ "columns": [
268
+ {
269
+ "expression": "expires_at",
270
+ "isExpression": false,
271
+ "asc": true,
272
+ "nulls": "last"
273
+ }
274
+ ],
275
+ "isUnique": false,
276
+ "concurrently": false,
277
+ "method": "btree",
278
+ "with": {}
279
+ }
280
+ },
281
+ "foreignKeys": {},
282
+ "compositePrimaryKeys": {},
283
+ "uniqueConstraints": {},
284
+ "policies": {},
285
+ "checkConstraints": {},
286
+ "isRLSEnabled": false
287
+ },
288
+ "public.chat_platform_ban": {
289
+ "name": "chat_platform_ban",
290
+ "schema": "",
291
+ "columns": {
292
+ "id": {
293
+ "name": "id",
294
+ "type": "uuid",
295
+ "primaryKey": true,
296
+ "notNull": true,
297
+ "default": "gen_random_uuid()"
298
+ },
299
+ "user_id": {
300
+ "name": "user_id",
301
+ "type": "uuid",
302
+ "primaryKey": false,
303
+ "notNull": true
304
+ },
305
+ "banned_by": {
306
+ "name": "banned_by",
307
+ "type": "uuid",
308
+ "primaryKey": false,
309
+ "notNull": true
310
+ },
311
+ "scope": {
312
+ "name": "scope",
313
+ "type": "chat_moderation_scope",
314
+ "typeSchema": "public",
315
+ "primaryKey": false,
316
+ "notNull": true,
317
+ "default": "'__all_public'"
318
+ },
319
+ "room_id": {
320
+ "name": "room_id",
321
+ "type": "uuid",
322
+ "primaryKey": false,
323
+ "notNull": false
324
+ },
325
+ "reason": {
326
+ "name": "reason",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true
330
+ },
331
+ "created_at": {
332
+ "name": "created_at",
333
+ "type": "timestamp with time zone",
334
+ "primaryKey": false,
335
+ "notNull": true,
336
+ "default": "now()"
337
+ },
338
+ "expires_at": {
339
+ "name": "expires_at",
340
+ "type": "timestamp with time zone",
341
+ "primaryKey": false,
342
+ "notNull": false
343
+ },
344
+ "lifted_at": {
345
+ "name": "lifted_at",
346
+ "type": "timestamp with time zone",
347
+ "primaryKey": false,
348
+ "notNull": false
349
+ },
350
+ "lifted_by": {
351
+ "name": "lifted_by",
352
+ "type": "uuid",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ }
356
+ },
357
+ "indexes": {
358
+ "chat_platform_ban_active_scope_key": {
359
+ "name": "chat_platform_ban_active_scope_key",
360
+ "columns": [
361
+ {
362
+ "expression": "user_id",
363
+ "isExpression": false,
364
+ "asc": true,
365
+ "nulls": "last"
366
+ },
367
+ {
368
+ "expression": "scope",
369
+ "isExpression": false,
370
+ "asc": true,
371
+ "nulls": "last"
372
+ }
373
+ ],
374
+ "isUnique": true,
375
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL AND \"chat_platform_ban\".\"room_id\" IS NULL",
376
+ "concurrently": false,
377
+ "method": "btree",
378
+ "with": {}
379
+ },
380
+ "chat_platform_ban_active_room_key": {
381
+ "name": "chat_platform_ban_active_room_key",
382
+ "columns": [
383
+ {
384
+ "expression": "user_id",
385
+ "isExpression": false,
386
+ "asc": true,
387
+ "nulls": "last"
388
+ },
389
+ {
390
+ "expression": "scope",
391
+ "isExpression": false,
392
+ "asc": true,
393
+ "nulls": "last"
394
+ },
395
+ {
396
+ "expression": "room_id",
397
+ "isExpression": false,
398
+ "asc": true,
399
+ "nulls": "last"
400
+ }
401
+ ],
402
+ "isUnique": true,
403
+ "where": "\"chat_platform_ban\".\"lifted_at\" IS NULL AND \"chat_platform_ban\".\"room_id\" IS NOT NULL",
404
+ "concurrently": false,
405
+ "method": "btree",
406
+ "with": {}
407
+ },
408
+ "chat_platform_ban_user_idx": {
409
+ "name": "chat_platform_ban_user_idx",
410
+ "columns": [
411
+ {
412
+ "expression": "user_id",
413
+ "isExpression": false,
414
+ "asc": true,
415
+ "nulls": "last"
416
+ }
417
+ ],
418
+ "isUnique": false,
419
+ "concurrently": false,
420
+ "method": "btree",
421
+ "with": {}
422
+ }
423
+ },
424
+ "foreignKeys": {
425
+ "chat_platform_ban_room_id_chat_room_id_fk": {
426
+ "name": "chat_platform_ban_room_id_chat_room_id_fk",
427
+ "tableFrom": "chat_platform_ban",
428
+ "tableTo": "chat_room",
429
+ "columnsFrom": ["room_id"],
430
+ "columnsTo": ["id"],
431
+ "onDelete": "no action",
432
+ "onUpdate": "no action"
433
+ }
434
+ },
435
+ "compositePrimaryKeys": {},
436
+ "uniqueConstraints": {},
437
+ "policies": {},
438
+ "checkConstraints": {},
439
+ "isRLSEnabled": false
440
+ },
441
+ "public.chat_room": {
442
+ "name": "chat_room",
443
+ "schema": "",
444
+ "columns": {
445
+ "id": {
446
+ "name": "id",
447
+ "type": "uuid",
448
+ "primaryKey": true,
449
+ "notNull": true,
450
+ "default": "gen_random_uuid()"
451
+ },
452
+ "name": {
453
+ "name": "name",
454
+ "type": "text",
455
+ "primaryKey": false,
456
+ "notNull": true
457
+ },
458
+ "slug": {
459
+ "name": "slug",
460
+ "type": "text",
461
+ "primaryKey": false,
462
+ "notNull": true
463
+ },
464
+ "category": {
465
+ "name": "category",
466
+ "type": "chat_room_category",
467
+ "typeSchema": "public",
468
+ "primaryKey": false,
469
+ "notNull": false
470
+ },
471
+ "is_public": {
472
+ "name": "is_public",
473
+ "type": "boolean",
474
+ "primaryKey": false,
475
+ "notNull": true,
476
+ "default": true
477
+ },
478
+ "join_code": {
479
+ "name": "join_code",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": false
483
+ },
484
+ "creator_id": {
485
+ "name": "creator_id",
486
+ "type": "uuid",
487
+ "primaryKey": false,
488
+ "notNull": false
489
+ },
490
+ "created_at": {
491
+ "name": "created_at",
492
+ "type": "timestamp with time zone",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "default": "now()"
496
+ },
497
+ "deleted_at": {
498
+ "name": "deleted_at",
499
+ "type": "timestamp with time zone",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "scheduled_deletion_at": {
504
+ "name": "scheduled_deletion_at",
505
+ "type": "timestamp with time zone",
506
+ "primaryKey": false,
507
+ "notNull": false
508
+ }
509
+ },
510
+ "indexes": {
511
+ "chat_room_slug_key": {
512
+ "name": "chat_room_slug_key",
513
+ "columns": [
514
+ {
515
+ "expression": "slug",
516
+ "isExpression": false,
517
+ "asc": true,
518
+ "nulls": "last"
519
+ }
520
+ ],
521
+ "isUnique": true,
522
+ "concurrently": false,
523
+ "method": "btree",
524
+ "with": {}
525
+ },
526
+ "chat_room_join_code_key": {
527
+ "name": "chat_room_join_code_key",
528
+ "columns": [
529
+ {
530
+ "expression": "join_code",
531
+ "isExpression": false,
532
+ "asc": true,
533
+ "nulls": "last"
534
+ }
535
+ ],
536
+ "isUnique": true,
537
+ "concurrently": false,
538
+ "method": "btree",
539
+ "with": {}
540
+ },
541
+ "chat_room_deleted_at_idx": {
542
+ "name": "chat_room_deleted_at_idx",
543
+ "columns": [
544
+ {
545
+ "expression": "deleted_at",
546
+ "isExpression": false,
547
+ "asc": true,
548
+ "nulls": "last"
549
+ }
550
+ ],
551
+ "isUnique": false,
552
+ "concurrently": false,
553
+ "method": "btree",
554
+ "with": {}
555
+ },
556
+ "chat_room_creator_public_deleted_at_idx": {
557
+ "name": "chat_room_creator_public_deleted_at_idx",
558
+ "columns": [
559
+ {
560
+ "expression": "creator_id",
561
+ "isExpression": false,
562
+ "asc": true,
563
+ "nulls": "last"
564
+ },
565
+ {
566
+ "expression": "is_public",
567
+ "isExpression": false,
568
+ "asc": true,
569
+ "nulls": "last"
570
+ },
571
+ {
572
+ "expression": "deleted_at",
573
+ "isExpression": false,
574
+ "asc": true,
575
+ "nulls": "last"
576
+ }
577
+ ],
578
+ "isUnique": false,
579
+ "concurrently": false,
580
+ "method": "btree",
581
+ "with": {}
582
+ },
583
+ "chat_room_scheduled_deletion_idx": {
584
+ "name": "chat_room_scheduled_deletion_idx",
585
+ "columns": [
586
+ {
587
+ "expression": "scheduled_deletion_at",
588
+ "isExpression": false,
589
+ "asc": true,
590
+ "nulls": "last"
591
+ }
592
+ ],
593
+ "isUnique": false,
594
+ "where": "\"chat_room\".\"scheduled_deletion_at\" IS NOT NULL",
595
+ "concurrently": false,
596
+ "method": "btree",
597
+ "with": {}
598
+ }
599
+ },
600
+ "foreignKeys": {},
601
+ "compositePrimaryKeys": {},
602
+ "uniqueConstraints": {},
603
+ "policies": {},
604
+ "checkConstraints": {},
605
+ "isRLSEnabled": false
606
+ },
607
+ "public.chat_room_ban": {
608
+ "name": "chat_room_ban",
609
+ "schema": "",
610
+ "columns": {
611
+ "id": {
612
+ "name": "id",
613
+ "type": "uuid",
614
+ "primaryKey": true,
615
+ "notNull": true,
616
+ "default": "gen_random_uuid()"
617
+ },
618
+ "room_id": {
619
+ "name": "room_id",
620
+ "type": "uuid",
621
+ "primaryKey": false,
622
+ "notNull": true
623
+ },
624
+ "user_id": {
625
+ "name": "user_id",
626
+ "type": "uuid",
627
+ "primaryKey": false,
628
+ "notNull": true
629
+ },
630
+ "banned_by": {
631
+ "name": "banned_by",
632
+ "type": "uuid",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "created_at": {
637
+ "name": "created_at",
638
+ "type": "timestamp with time zone",
639
+ "primaryKey": false,
640
+ "notNull": true,
641
+ "default": "now()"
642
+ },
643
+ "expires_at": {
644
+ "name": "expires_at",
645
+ "type": "timestamp with time zone",
646
+ "primaryKey": false,
647
+ "notNull": false
648
+ },
649
+ "lifted_at": {
650
+ "name": "lifted_at",
651
+ "type": "timestamp with time zone",
652
+ "primaryKey": false,
653
+ "notNull": false
654
+ },
655
+ "lifted_by": {
656
+ "name": "lifted_by",
657
+ "type": "uuid",
658
+ "primaryKey": false,
659
+ "notNull": false
660
+ }
661
+ },
662
+ "indexes": {
663
+ "chat_room_ban_active_room_user_key": {
664
+ "name": "chat_room_ban_active_room_user_key",
665
+ "columns": [
666
+ {
667
+ "expression": "room_id",
668
+ "isExpression": false,
669
+ "asc": true,
670
+ "nulls": "last"
671
+ },
672
+ {
673
+ "expression": "user_id",
674
+ "isExpression": false,
675
+ "asc": true,
676
+ "nulls": "last"
677
+ }
678
+ ],
679
+ "isUnique": true,
680
+ "where": "\"chat_room_ban\".\"lifted_at\" IS NULL",
681
+ "concurrently": false,
682
+ "method": "btree",
683
+ "with": {}
684
+ },
685
+ "chat_room_ban_room_idx": {
686
+ "name": "chat_room_ban_room_idx",
687
+ "columns": [
688
+ {
689
+ "expression": "room_id",
690
+ "isExpression": false,
691
+ "asc": true,
692
+ "nulls": "last"
693
+ }
694
+ ],
695
+ "isUnique": false,
696
+ "concurrently": false,
697
+ "method": "btree",
698
+ "with": {}
699
+ },
700
+ "chat_room_ban_user_idx": {
701
+ "name": "chat_room_ban_user_idx",
702
+ "columns": [
703
+ {
704
+ "expression": "user_id",
705
+ "isExpression": false,
706
+ "asc": true,
707
+ "nulls": "last"
708
+ }
709
+ ],
710
+ "isUnique": false,
711
+ "concurrently": false,
712
+ "method": "btree",
713
+ "with": {}
714
+ },
715
+ "chat_room_ban_expires_at_idx": {
716
+ "name": "chat_room_ban_expires_at_idx",
717
+ "columns": [
718
+ {
719
+ "expression": "expires_at",
720
+ "isExpression": false,
721
+ "asc": true,
722
+ "nulls": "last"
723
+ }
724
+ ],
725
+ "isUnique": false,
726
+ "concurrently": false,
727
+ "method": "btree",
728
+ "with": {}
729
+ }
730
+ },
731
+ "foreignKeys": {
732
+ "chat_room_ban_room_id_chat_room_id_fk": {
733
+ "name": "chat_room_ban_room_id_chat_room_id_fk",
734
+ "tableFrom": "chat_room_ban",
735
+ "tableTo": "chat_room",
736
+ "columnsFrom": ["room_id"],
737
+ "columnsTo": ["id"],
738
+ "onDelete": "cascade",
739
+ "onUpdate": "no action"
740
+ }
741
+ },
742
+ "compositePrimaryKeys": {},
743
+ "uniqueConstraints": {},
744
+ "policies": {},
745
+ "checkConstraints": {},
746
+ "isRLSEnabled": false
747
+ },
748
+ "public.chat_room_configuration": {
749
+ "name": "chat_room_configuration",
750
+ "schema": "",
751
+ "columns": {
752
+ "id": {
753
+ "name": "id",
754
+ "type": "uuid",
755
+ "primaryKey": true,
756
+ "notNull": true,
757
+ "default": "gen_random_uuid()"
758
+ },
759
+ "room_id": {
760
+ "name": "room_id",
761
+ "type": "uuid",
762
+ "primaryKey": false,
763
+ "notNull": true
764
+ },
765
+ "slow_mode": {
766
+ "name": "slow_mode",
767
+ "type": "boolean",
768
+ "primaryKey": false,
769
+ "notNull": true,
770
+ "default": false
771
+ },
772
+ "slow_mode_seconds": {
773
+ "name": "slow_mode_seconds",
774
+ "type": "integer",
775
+ "primaryKey": false,
776
+ "notNull": true,
777
+ "default": 0
778
+ },
779
+ "read_only_mode": {
780
+ "name": "read_only_mode",
781
+ "type": "boolean",
782
+ "primaryKey": false,
783
+ "notNull": true,
784
+ "default": false
785
+ },
786
+ "only_invited_can_join": {
787
+ "name": "only_invited_can_join",
788
+ "type": "boolean",
789
+ "primaryKey": false,
790
+ "notNull": true,
791
+ "default": false
792
+ },
793
+ "lock_room": {
794
+ "name": "lock_room",
795
+ "type": "boolean",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "default": false
799
+ },
800
+ "moderator_invite": {
801
+ "name": "moderator_invite",
802
+ "type": "boolean",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "default": false
806
+ },
807
+ "created_at": {
808
+ "name": "created_at",
809
+ "type": "timestamp with time zone",
810
+ "primaryKey": false,
811
+ "notNull": true,
812
+ "default": "now()"
813
+ },
814
+ "updated_at": {
815
+ "name": "updated_at",
816
+ "type": "timestamp with time zone",
817
+ "primaryKey": false,
818
+ "notNull": true,
819
+ "default": "now()"
820
+ }
821
+ },
822
+ "indexes": {
823
+ "chat_room_configuration_room_key": {
824
+ "name": "chat_room_configuration_room_key",
825
+ "columns": [
826
+ {
827
+ "expression": "room_id",
828
+ "isExpression": false,
829
+ "asc": true,
830
+ "nulls": "last"
831
+ }
832
+ ],
833
+ "isUnique": true,
834
+ "concurrently": false,
835
+ "method": "btree",
836
+ "with": {}
837
+ }
838
+ },
839
+ "foreignKeys": {
840
+ "chat_room_configuration_room_id_chat_room_id_fk": {
841
+ "name": "chat_room_configuration_room_id_chat_room_id_fk",
842
+ "tableFrom": "chat_room_configuration",
843
+ "tableTo": "chat_room",
844
+ "columnsFrom": ["room_id"],
845
+ "columnsTo": ["id"],
846
+ "onDelete": "cascade",
847
+ "onUpdate": "no action"
848
+ }
849
+ },
850
+ "compositePrimaryKeys": {},
851
+ "uniqueConstraints": {},
852
+ "policies": {},
853
+ "checkConstraints": {},
854
+ "isRLSEnabled": false
855
+ },
856
+ "public.chat_room_member": {
857
+ "name": "chat_room_member",
858
+ "schema": "",
859
+ "columns": {
860
+ "id": {
861
+ "name": "id",
862
+ "type": "uuid",
863
+ "primaryKey": true,
864
+ "notNull": true,
865
+ "default": "gen_random_uuid()"
866
+ },
867
+ "room_id": {
868
+ "name": "room_id",
869
+ "type": "uuid",
870
+ "primaryKey": false,
871
+ "notNull": true
872
+ },
873
+ "user_id": {
874
+ "name": "user_id",
875
+ "type": "uuid",
876
+ "primaryKey": false,
877
+ "notNull": true
878
+ },
879
+ "role": {
880
+ "name": "role",
881
+ "type": "chat_room_role",
882
+ "typeSchema": "public",
883
+ "primaryKey": false,
884
+ "notNull": true,
885
+ "default": "'member'"
886
+ },
887
+ "role_assigned_at": {
888
+ "name": "role_assigned_at",
889
+ "type": "timestamp with time zone",
890
+ "primaryKey": false,
891
+ "notNull": false
892
+ },
893
+ "account_closed_at": {
894
+ "name": "account_closed_at",
895
+ "type": "timestamp with time zone",
896
+ "primaryKey": false,
897
+ "notNull": false
898
+ },
899
+ "joined_at": {
900
+ "name": "joined_at",
901
+ "type": "timestamp with time zone",
902
+ "primaryKey": false,
903
+ "notNull": true,
904
+ "default": "now()"
905
+ }
906
+ },
907
+ "indexes": {
908
+ "chat_room_member_room_user_key": {
909
+ "name": "chat_room_member_room_user_key",
910
+ "columns": [
911
+ {
912
+ "expression": "room_id",
913
+ "isExpression": false,
914
+ "asc": true,
915
+ "nulls": "last"
916
+ },
917
+ {
918
+ "expression": "user_id",
919
+ "isExpression": false,
920
+ "asc": true,
921
+ "nulls": "last"
922
+ }
923
+ ],
924
+ "isUnique": true,
925
+ "concurrently": false,
926
+ "method": "btree",
927
+ "with": {}
928
+ },
929
+ "chat_room_member_room_idx": {
930
+ "name": "chat_room_member_room_idx",
931
+ "columns": [
932
+ {
933
+ "expression": "room_id",
934
+ "isExpression": false,
935
+ "asc": true,
936
+ "nulls": "last"
937
+ }
938
+ ],
939
+ "isUnique": false,
940
+ "concurrently": false,
941
+ "method": "btree",
942
+ "with": {}
943
+ },
944
+ "chat_room_member_user_idx": {
945
+ "name": "chat_room_member_user_idx",
946
+ "columns": [
947
+ {
948
+ "expression": "user_id",
949
+ "isExpression": false,
950
+ "asc": true,
951
+ "nulls": "last"
952
+ }
953
+ ],
954
+ "isUnique": false,
955
+ "concurrently": false,
956
+ "method": "btree",
957
+ "with": {}
958
+ }
959
+ },
960
+ "foreignKeys": {
961
+ "chat_room_member_room_id_chat_room_id_fk": {
962
+ "name": "chat_room_member_room_id_chat_room_id_fk",
963
+ "tableFrom": "chat_room_member",
964
+ "tableTo": "chat_room",
965
+ "columnsFrom": ["room_id"],
966
+ "columnsTo": ["id"],
967
+ "onDelete": "cascade",
968
+ "onUpdate": "no action"
969
+ }
970
+ },
971
+ "compositePrimaryKeys": {},
972
+ "uniqueConstraints": {},
973
+ "policies": {},
974
+ "checkConstraints": {},
975
+ "isRLSEnabled": false
976
+ },
977
+ "public.chat_room_mute": {
978
+ "name": "chat_room_mute",
979
+ "schema": "",
980
+ "columns": {
981
+ "id": {
982
+ "name": "id",
983
+ "type": "uuid",
984
+ "primaryKey": true,
985
+ "notNull": true,
986
+ "default": "gen_random_uuid()"
987
+ },
988
+ "room_id": {
989
+ "name": "room_id",
990
+ "type": "uuid",
991
+ "primaryKey": false,
992
+ "notNull": true
993
+ },
994
+ "user_id": {
995
+ "name": "user_id",
996
+ "type": "uuid",
997
+ "primaryKey": false,
998
+ "notNull": true
999
+ },
1000
+ "muted_by": {
1001
+ "name": "muted_by",
1002
+ "type": "uuid",
1003
+ "primaryKey": false,
1004
+ "notNull": true
1005
+ },
1006
+ "reason": {
1007
+ "name": "reason",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true
1011
+ },
1012
+ "created_at": {
1013
+ "name": "created_at",
1014
+ "type": "timestamp with time zone",
1015
+ "primaryKey": false,
1016
+ "notNull": true,
1017
+ "default": "now()"
1018
+ },
1019
+ "expires_at": {
1020
+ "name": "expires_at",
1021
+ "type": "timestamp with time zone",
1022
+ "primaryKey": false,
1023
+ "notNull": false
1024
+ },
1025
+ "lifted_at": {
1026
+ "name": "lifted_at",
1027
+ "type": "timestamp with time zone",
1028
+ "primaryKey": false,
1029
+ "notNull": false
1030
+ },
1031
+ "lifted_by": {
1032
+ "name": "lifted_by",
1033
+ "type": "uuid",
1034
+ "primaryKey": false,
1035
+ "notNull": false
1036
+ }
1037
+ },
1038
+ "indexes": {
1039
+ "chat_room_mute_active_room_user_key": {
1040
+ "name": "chat_room_mute_active_room_user_key",
1041
+ "columns": [
1042
+ {
1043
+ "expression": "room_id",
1044
+ "isExpression": false,
1045
+ "asc": true,
1046
+ "nulls": "last"
1047
+ },
1048
+ {
1049
+ "expression": "user_id",
1050
+ "isExpression": false,
1051
+ "asc": true,
1052
+ "nulls": "last"
1053
+ }
1054
+ ],
1055
+ "isUnique": true,
1056
+ "where": "\"chat_room_mute\".\"lifted_at\" IS NULL",
1057
+ "concurrently": false,
1058
+ "method": "btree",
1059
+ "with": {}
1060
+ },
1061
+ "chat_room_mute_room_user_idx": {
1062
+ "name": "chat_room_mute_room_user_idx",
1063
+ "columns": [
1064
+ {
1065
+ "expression": "room_id",
1066
+ "isExpression": false,
1067
+ "asc": true,
1068
+ "nulls": "last"
1069
+ },
1070
+ {
1071
+ "expression": "user_id",
1072
+ "isExpression": false,
1073
+ "asc": true,
1074
+ "nulls": "last"
1075
+ }
1076
+ ],
1077
+ "isUnique": false,
1078
+ "concurrently": false,
1079
+ "method": "btree",
1080
+ "with": {}
1081
+ },
1082
+ "chat_room_mute_expires_at_idx": {
1083
+ "name": "chat_room_mute_expires_at_idx",
1084
+ "columns": [
1085
+ {
1086
+ "expression": "expires_at",
1087
+ "isExpression": false,
1088
+ "asc": true,
1089
+ "nulls": "last"
1090
+ }
1091
+ ],
1092
+ "isUnique": false,
1093
+ "concurrently": false,
1094
+ "method": "btree",
1095
+ "with": {}
1096
+ }
1097
+ },
1098
+ "foreignKeys": {
1099
+ "chat_room_mute_room_id_chat_room_id_fk": {
1100
+ "name": "chat_room_mute_room_id_chat_room_id_fk",
1101
+ "tableFrom": "chat_room_mute",
1102
+ "tableTo": "chat_room",
1103
+ "columnsFrom": ["room_id"],
1104
+ "columnsTo": ["id"],
1105
+ "onDelete": "cascade",
1106
+ "onUpdate": "no action"
1107
+ }
1108
+ },
1109
+ "compositePrimaryKeys": {},
1110
+ "uniqueConstraints": {},
1111
+ "policies": {},
1112
+ "checkConstraints": {},
1113
+ "isRLSEnabled": false
1114
+ },
1115
+ "public.chat_room_remove": {
1116
+ "name": "chat_room_remove",
1117
+ "schema": "",
1118
+ "columns": {
1119
+ "id": {
1120
+ "name": "id",
1121
+ "type": "uuid",
1122
+ "primaryKey": true,
1123
+ "notNull": true,
1124
+ "default": "gen_random_uuid()"
1125
+ },
1126
+ "room_id": {
1127
+ "name": "room_id",
1128
+ "type": "uuid",
1129
+ "primaryKey": false,
1130
+ "notNull": true
1131
+ },
1132
+ "user_id": {
1133
+ "name": "user_id",
1134
+ "type": "uuid",
1135
+ "primaryKey": false,
1136
+ "notNull": true
1137
+ },
1138
+ "removed_by": {
1139
+ "name": "removed_by",
1140
+ "type": "uuid",
1141
+ "primaryKey": false,
1142
+ "notNull": true
1143
+ },
1144
+ "reason": {
1145
+ "name": "reason",
1146
+ "type": "text",
1147
+ "primaryKey": false,
1148
+ "notNull": true
1149
+ },
1150
+ "created_at": {
1151
+ "name": "created_at",
1152
+ "type": "timestamp with time zone",
1153
+ "primaryKey": false,
1154
+ "notNull": true,
1155
+ "default": "now()"
1156
+ }
1157
+ },
1158
+ "indexes": {
1159
+ "chat_room_remove_room_created_at_idx": {
1160
+ "name": "chat_room_remove_room_created_at_idx",
1161
+ "columns": [
1162
+ {
1163
+ "expression": "room_id",
1164
+ "isExpression": false,
1165
+ "asc": true,
1166
+ "nulls": "last"
1167
+ },
1168
+ {
1169
+ "expression": "created_at",
1170
+ "isExpression": false,
1171
+ "asc": true,
1172
+ "nulls": "last"
1173
+ }
1174
+ ],
1175
+ "isUnique": false,
1176
+ "concurrently": false,
1177
+ "method": "btree",
1178
+ "with": {}
1179
+ },
1180
+ "chat_room_remove_user_idx": {
1181
+ "name": "chat_room_remove_user_idx",
1182
+ "columns": [
1183
+ {
1184
+ "expression": "user_id",
1185
+ "isExpression": false,
1186
+ "asc": true,
1187
+ "nulls": "last"
1188
+ }
1189
+ ],
1190
+ "isUnique": false,
1191
+ "concurrently": false,
1192
+ "method": "btree",
1193
+ "with": {}
1194
+ }
1195
+ },
1196
+ "foreignKeys": {
1197
+ "chat_room_remove_room_id_chat_room_id_fk": {
1198
+ "name": "chat_room_remove_room_id_chat_room_id_fk",
1199
+ "tableFrom": "chat_room_remove",
1200
+ "tableTo": "chat_room",
1201
+ "columnsFrom": ["room_id"],
1202
+ "columnsTo": ["id"],
1203
+ "onDelete": "cascade",
1204
+ "onUpdate": "no action"
1205
+ }
1206
+ },
1207
+ "compositePrimaryKeys": {},
1208
+ "uniqueConstraints": {},
1209
+ "policies": {},
1210
+ "checkConstraints": {},
1211
+ "isRLSEnabled": false
1212
+ },
1213
+ "public.chat_room_rule": {
1214
+ "name": "chat_room_rule",
1215
+ "schema": "",
1216
+ "columns": {
1217
+ "id": {
1218
+ "name": "id",
1219
+ "type": "uuid",
1220
+ "primaryKey": true,
1221
+ "notNull": true,
1222
+ "default": "gen_random_uuid()"
1223
+ },
1224
+ "room_id": {
1225
+ "name": "room_id",
1226
+ "type": "uuid",
1227
+ "primaryKey": false,
1228
+ "notNull": true
1229
+ },
1230
+ "created_by": {
1231
+ "name": "created_by",
1232
+ "type": "uuid",
1233
+ "primaryKey": false,
1234
+ "notNull": true
1235
+ },
1236
+ "order_num": {
1237
+ "name": "order_num",
1238
+ "type": "integer",
1239
+ "primaryKey": false,
1240
+ "notNull": true
1241
+ },
1242
+ "content": {
1243
+ "name": "content",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": true
1247
+ },
1248
+ "created_at": {
1249
+ "name": "created_at",
1250
+ "type": "timestamp with time zone",
1251
+ "primaryKey": false,
1252
+ "notNull": true,
1253
+ "default": "now()"
1254
+ },
1255
+ "updated_at": {
1256
+ "name": "updated_at",
1257
+ "type": "timestamp with time zone",
1258
+ "primaryKey": false,
1259
+ "notNull": true,
1260
+ "default": "now()"
1261
+ }
1262
+ },
1263
+ "indexes": {
1264
+ "chat_room_rule_room_order_idx": {
1265
+ "name": "chat_room_rule_room_order_idx",
1266
+ "columns": [
1267
+ {
1268
+ "expression": "room_id",
1269
+ "isExpression": false,
1270
+ "asc": true,
1271
+ "nulls": "last"
1272
+ },
1273
+ {
1274
+ "expression": "order_num",
1275
+ "isExpression": false,
1276
+ "asc": true,
1277
+ "nulls": "last"
1278
+ }
1279
+ ],
1280
+ "isUnique": false,
1281
+ "concurrently": false,
1282
+ "method": "btree",
1283
+ "with": {}
1284
+ },
1285
+ "chat_room_rule_room_idx": {
1286
+ "name": "chat_room_rule_room_idx",
1287
+ "columns": [
1288
+ {
1289
+ "expression": "room_id",
1290
+ "isExpression": false,
1291
+ "asc": true,
1292
+ "nulls": "last"
1293
+ }
1294
+ ],
1295
+ "isUnique": false,
1296
+ "concurrently": false,
1297
+ "method": "btree",
1298
+ "with": {}
1299
+ }
1300
+ },
1301
+ "foreignKeys": {
1302
+ "chat_room_rule_room_id_chat_room_id_fk": {
1303
+ "name": "chat_room_rule_room_id_chat_room_id_fk",
1304
+ "tableFrom": "chat_room_rule",
1305
+ "tableTo": "chat_room",
1306
+ "columnsFrom": ["room_id"],
1307
+ "columnsTo": ["id"],
1308
+ "onDelete": "cascade",
1309
+ "onUpdate": "no action"
1310
+ }
1311
+ },
1312
+ "compositePrimaryKeys": {},
1313
+ "uniqueConstraints": {},
1314
+ "policies": {},
1315
+ "checkConstraints": {},
1316
+ "isRLSEnabled": false
1317
+ },
1318
+ "public.chat_user_block": {
1319
+ "name": "chat_user_block",
1320
+ "schema": "",
1321
+ "columns": {
1322
+ "id": {
1323
+ "name": "id",
1324
+ "type": "uuid",
1325
+ "primaryKey": true,
1326
+ "notNull": true,
1327
+ "default": "gen_random_uuid()"
1328
+ },
1329
+ "blocker_id": {
1330
+ "name": "blocker_id",
1331
+ "type": "uuid",
1332
+ "primaryKey": false,
1333
+ "notNull": true
1334
+ },
1335
+ "blocked_id": {
1336
+ "name": "blocked_id",
1337
+ "type": "uuid",
1338
+ "primaryKey": false,
1339
+ "notNull": true
1340
+ },
1341
+ "created_at": {
1342
+ "name": "created_at",
1343
+ "type": "timestamp with time zone",
1344
+ "primaryKey": false,
1345
+ "notNull": true,
1346
+ "default": "now()"
1347
+ },
1348
+ "removed_at": {
1349
+ "name": "removed_at",
1350
+ "type": "timestamp with time zone",
1351
+ "primaryKey": false,
1352
+ "notNull": false
1353
+ }
1354
+ },
1355
+ "indexes": {
1356
+ "chat_user_block_pair_key": {
1357
+ "name": "chat_user_block_pair_key",
1358
+ "columns": [
1359
+ {
1360
+ "expression": "blocker_id",
1361
+ "isExpression": false,
1362
+ "asc": true,
1363
+ "nulls": "last"
1364
+ },
1365
+ {
1366
+ "expression": "blocked_id",
1367
+ "isExpression": false,
1368
+ "asc": true,
1369
+ "nulls": "last"
1370
+ }
1371
+ ],
1372
+ "isUnique": true,
1373
+ "where": "\"chat_user_block\".\"removed_at\" IS NULL",
1374
+ "concurrently": false,
1375
+ "method": "btree",
1376
+ "with": {}
1377
+ },
1378
+ "chat_user_block_blocker_idx": {
1379
+ "name": "chat_user_block_blocker_idx",
1380
+ "columns": [
1381
+ {
1382
+ "expression": "blocker_id",
1383
+ "isExpression": false,
1384
+ "asc": true,
1385
+ "nulls": "last"
1386
+ }
1387
+ ],
1388
+ "isUnique": false,
1389
+ "concurrently": false,
1390
+ "method": "btree",
1391
+ "with": {}
1392
+ }
1393
+ },
1394
+ "foreignKeys": {},
1395
+ "compositePrimaryKeys": {},
1396
+ "uniqueConstraints": {},
1397
+ "policies": {},
1398
+ "checkConstraints": {},
1399
+ "isRLSEnabled": false
1400
+ },
1401
+ "public.chat_user_ignore": {
1402
+ "name": "chat_user_ignore",
1403
+ "schema": "",
1404
+ "columns": {
1405
+ "id": {
1406
+ "name": "id",
1407
+ "type": "uuid",
1408
+ "primaryKey": true,
1409
+ "notNull": true,
1410
+ "default": "gen_random_uuid()"
1411
+ },
1412
+ "ignorer_id": {
1413
+ "name": "ignorer_id",
1414
+ "type": "uuid",
1415
+ "primaryKey": false,
1416
+ "notNull": true
1417
+ },
1418
+ "ignored_id": {
1419
+ "name": "ignored_id",
1420
+ "type": "uuid",
1421
+ "primaryKey": false,
1422
+ "notNull": true
1423
+ },
1424
+ "created_at": {
1425
+ "name": "created_at",
1426
+ "type": "timestamp with time zone",
1427
+ "primaryKey": false,
1428
+ "notNull": true,
1429
+ "default": "now()"
1430
+ },
1431
+ "removed_at": {
1432
+ "name": "removed_at",
1433
+ "type": "timestamp with time zone",
1434
+ "primaryKey": false,
1435
+ "notNull": false
1436
+ }
1437
+ },
1438
+ "indexes": {
1439
+ "chat_user_ignore_pair_key": {
1440
+ "name": "chat_user_ignore_pair_key",
1441
+ "columns": [
1442
+ {
1443
+ "expression": "ignorer_id",
1444
+ "isExpression": false,
1445
+ "asc": true,
1446
+ "nulls": "last"
1447
+ },
1448
+ {
1449
+ "expression": "ignored_id",
1450
+ "isExpression": false,
1451
+ "asc": true,
1452
+ "nulls": "last"
1453
+ }
1454
+ ],
1455
+ "isUnique": true,
1456
+ "where": "\"chat_user_ignore\".\"removed_at\" IS NULL",
1457
+ "concurrently": false,
1458
+ "method": "btree",
1459
+ "with": {}
1460
+ },
1461
+ "chat_user_ignore_ignorer_idx": {
1462
+ "name": "chat_user_ignore_ignorer_idx",
1463
+ "columns": [
1464
+ {
1465
+ "expression": "ignorer_id",
1466
+ "isExpression": false,
1467
+ "asc": true,
1468
+ "nulls": "last"
1469
+ }
1470
+ ],
1471
+ "isUnique": false,
1472
+ "concurrently": false,
1473
+ "method": "btree",
1474
+ "with": {}
1475
+ }
1476
+ },
1477
+ "foreignKeys": {},
1478
+ "compositePrimaryKeys": {},
1479
+ "uniqueConstraints": {},
1480
+ "policies": {},
1481
+ "checkConstraints": {},
1482
+ "isRLSEnabled": false
1483
+ }
1484
+ },
1485
+ "enums": {
1486
+ "public.chat_message_type": {
1487
+ "name": "chat_message_type",
1488
+ "schema": "public",
1489
+ "values": ["user", "system"]
1490
+ },
1491
+ "public.chat_moderation_scope": {
1492
+ "name": "chat_moderation_scope",
1493
+ "schema": "public",
1494
+ "values": ["__global", "__all_public", "__all", "room"]
1495
+ },
1496
+ "public.chat_room_category": {
1497
+ "name": "chat_room_category",
1498
+ "schema": "public",
1499
+ "values": ["games-sports", "regions", "languages", "private-channels"]
1500
+ },
1501
+ "public.chat_room_role": {
1502
+ "name": "chat_room_role",
1503
+ "schema": "public",
1504
+ "values": ["member", "moderator", "owner"]
1505
+ }
1506
+ },
1507
+ "schemas": {},
1508
+ "sequences": {},
1509
+ "roles": {},
1510
+ "policies": {},
1511
+ "views": {},
1512
+ "_meta": {
1513
+ "columns": {},
1514
+ "schemas": {},
1515
+ "tables": {}
1516
+ }
1517
+ }