@tstdl/base 0.92.129 → 0.92.131

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 (72) hide show
  1. package/ai/ai.service.js +4 -4
  2. package/api/server/api-controller.js +1 -2
  3. package/document-management/api/document-management.api.d.ts +25 -55
  4. package/document-management/api/document-management.api.js +9 -18
  5. package/document-management/models/document-request-collection-assignment.model.d.ts +7 -0
  6. package/document-management/models/{document-request-collection.model.js → document-request-collection-assignment.model.js} +6 -6
  7. package/document-management/models/index.d.ts +1 -1
  8. package/document-management/models/index.js +1 -1
  9. package/document-management/server/api/document-management.api.d.ts +26 -0
  10. package/document-management/server/api/document-management.api.js +169 -0
  11. package/document-management/server/api/index.d.ts +1 -0
  12. package/document-management/server/api/index.js +1 -0
  13. package/document-management/server/drizzle/{0000_cool_victor_mancha.sql → 0000_magical_madame_hydra.sql} +128 -96
  14. package/document-management/server/drizzle/meta/0000_snapshot.json +768 -492
  15. package/document-management/server/drizzle/meta/_journal.json +2 -9
  16. package/document-management/server/index.d.ts +1 -0
  17. package/document-management/server/index.js +1 -0
  18. package/document-management/server/schemas.d.ts +3 -2
  19. package/document-management/server/schemas.js +3 -2
  20. package/document-management/server/services/document-category-type.service.d.ts +2 -0
  21. package/document-management/server/services/document-category-type.service.js +26 -15
  22. package/document-management/server/services/document-collection.service.js +13 -2
  23. package/document-management/server/services/document-file.service.js +15 -4
  24. package/document-management/server/services/document-management-ai.service.js +19 -8
  25. package/document-management/server/services/document-management-ancillary.service.d.ts +21 -40
  26. package/document-management/server/services/document-management-ancillary.service.js +25 -14
  27. package/document-management/server/services/document-management.service.d.ts +1 -1
  28. package/document-management/server/services/document-management.service.js +53 -34
  29. package/document-management/server/services/document-property.service.d.ts +2 -34
  30. package/document-management/server/services/document-property.service.js +20 -8
  31. package/document-management/server/services/document-request.service.js +11 -11
  32. package/document-management/server/services/document-validation.service.js +15 -4
  33. package/document-management/server/services/document-workflow.service.js +27 -16
  34. package/document-management/server/services/document.service.d.ts +10 -2
  35. package/document-management/server/services/document.service.js +61 -8
  36. package/document-management/server/services/index.d.ts +1 -0
  37. package/document-management/server/services/index.js +1 -0
  38. package/document-management/server/services/singleton.d.ts +4 -0
  39. package/document-management/server/services/singleton.js +12 -0
  40. package/document-management/service-models/document.service-model.d.ts +8 -9
  41. package/document-management/service-models/document.service-model.js +1 -1
  42. package/eslint.config.js +1 -0
  43. package/examples/document-management/categories-and-types.d.ts +324 -0
  44. package/examples/document-management/categories-and-types.js +363 -0
  45. package/examples/document-management/main.d.ts +7 -8
  46. package/examples/document-management/main.js +86 -27
  47. package/injector/decorators.d.ts +1 -0
  48. package/injector/decorators.js +41 -12
  49. package/injector/inject.d.ts +12 -2
  50. package/injector/injector.d.ts +3 -2
  51. package/injector/injector.js +87 -36
  52. package/injector/symbols.d.ts +1 -0
  53. package/injector/symbols.js +1 -0
  54. package/module/modules/web-server.module.js +4 -4
  55. package/orm/server/database.d.ts +0 -4
  56. package/orm/server/database.js +0 -4
  57. package/orm/server/drizzle/schema-converter.js +5 -4
  58. package/orm/server/module.d.ts +0 -4
  59. package/orm/server/module.js +0 -2
  60. package/orm/server/query-converter.js +11 -38
  61. package/orm/server/repository.d.ts +3 -2
  62. package/orm/server/repository.js +2 -2
  63. package/orm/server/transaction.d.ts +5 -4
  64. package/orm/server/transaction.js +8 -3
  65. package/orm/server/transactional.js +3 -3
  66. package/orm/sqls.d.ts +4 -1
  67. package/orm/sqls.js +4 -1
  68. package/package.json +4 -4
  69. package/reflection/registry.js +6 -6
  70. package/document-management/models/document-request-collection.model.d.ts +0 -7
  71. package/document-management/server/drizzle/0001_concerned_quentin_quire.sql +0 -2
  72. package/document-management/server/drizzle/meta/0001_snapshot.json +0 -1932
@@ -1,1932 +0,0 @@
1
- {
2
- "id": "0eb85095-42f5-4a1d-ba2c-3676e88cdf2a",
3
- "prevId": "2ad29e58-dbc7-4a44-bc99-11a437139566",
4
- "version": "7",
5
- "dialect": "postgresql",
6
- "tables": {
7
- "document_management.document": {
8
- "name": "document",
9
- "schema": "document_management",
10
- "columns": {
11
- "id": {
12
- "name": "id",
13
- "type": "uuid",
14
- "primaryKey": true,
15
- "notNull": true,
16
- "default": "gen_random_uuid()"
17
- },
18
- "file_id": {
19
- "name": "file_id",
20
- "type": "uuid",
21
- "primaryKey": false,
22
- "notNull": true
23
- },
24
- "type_id": {
25
- "name": "type_id",
26
- "type": "uuid",
27
- "primaryKey": false,
28
- "notNull": false
29
- },
30
- "title": {
31
- "name": "title",
32
- "type": "text",
33
- "primaryKey": false,
34
- "notNull": false
35
- },
36
- "subtitle": {
37
- "name": "subtitle",
38
- "type": "text",
39
- "primaryKey": false,
40
- "notNull": false
41
- },
42
- "pages": {
43
- "name": "pages",
44
- "type": "integer",
45
- "primaryKey": false,
46
- "notNull": false
47
- },
48
- "date": {
49
- "name": "date",
50
- "type": "date",
51
- "primaryKey": false,
52
- "notNull": false
53
- },
54
- "summary": {
55
- "name": "summary",
56
- "type": "text",
57
- "primaryKey": false,
58
- "notNull": false
59
- },
60
- "tags": {
61
- "name": "tags",
62
- "type": "text[]",
63
- "primaryKey": false,
64
- "notNull": false
65
- },
66
- "validated": {
67
- "name": "validated",
68
- "type": "boolean",
69
- "primaryKey": false,
70
- "notNull": true
71
- },
72
- "revision": {
73
- "name": "revision",
74
- "type": "integer",
75
- "primaryKey": false,
76
- "notNull": true
77
- },
78
- "revision_timestamp": {
79
- "name": "revision_timestamp",
80
- "type": "timestamp with time zone",
81
- "primaryKey": false,
82
- "notNull": true
83
- },
84
- "create_timestamp": {
85
- "name": "create_timestamp",
86
- "type": "timestamp with time zone",
87
- "primaryKey": false,
88
- "notNull": true
89
- },
90
- "delete_timestamp": {
91
- "name": "delete_timestamp",
92
- "type": "timestamp with time zone",
93
- "primaryKey": false,
94
- "notNull": false
95
- },
96
- "attributes": {
97
- "name": "attributes",
98
- "type": "jsonb",
99
- "primaryKey": false,
100
- "notNull": true,
101
- "default": "'{}'::jsonb"
102
- }
103
- },
104
- "indexes": {},
105
- "foreignKeys": {
106
- "document_file_id_document_file_id_fk": {
107
- "name": "document_file_id_document_file_id_fk",
108
- "tableFrom": "document",
109
- "tableTo": "document_file",
110
- "schemaTo": "document_management",
111
- "columnsFrom": [
112
- "file_id"
113
- ],
114
- "columnsTo": [
115
- "id"
116
- ],
117
- "onDelete": "no action",
118
- "onUpdate": "no action"
119
- },
120
- "document_type_id_document_type_id_fk": {
121
- "name": "document_type_id_document_type_id_fk",
122
- "tableFrom": "document",
123
- "tableTo": "document_type",
124
- "schemaTo": "document_management",
125
- "columnsFrom": [
126
- "type_id"
127
- ],
128
- "columnsTo": [
129
- "id"
130
- ],
131
- "onDelete": "no action",
132
- "onUpdate": "no action"
133
- }
134
- },
135
- "compositePrimaryKeys": {},
136
- "uniqueConstraints": {},
137
- "policies": {},
138
- "checkConstraints": {},
139
- "isRLSEnabled": false
140
- },
141
- "document_management.document_category": {
142
- "name": "document_category",
143
- "schema": "document_management",
144
- "columns": {
145
- "id": {
146
- "name": "id",
147
- "type": "uuid",
148
- "primaryKey": true,
149
- "notNull": true,
150
- "default": "gen_random_uuid()"
151
- },
152
- "label": {
153
- "name": "label",
154
- "type": "text",
155
- "primaryKey": false,
156
- "notNull": true
157
- },
158
- "revision": {
159
- "name": "revision",
160
- "type": "integer",
161
- "primaryKey": false,
162
- "notNull": true
163
- },
164
- "revision_timestamp": {
165
- "name": "revision_timestamp",
166
- "type": "timestamp with time zone",
167
- "primaryKey": false,
168
- "notNull": true
169
- },
170
- "create_timestamp": {
171
- "name": "create_timestamp",
172
- "type": "timestamp with time zone",
173
- "primaryKey": false,
174
- "notNull": true
175
- },
176
- "delete_timestamp": {
177
- "name": "delete_timestamp",
178
- "type": "timestamp with time zone",
179
- "primaryKey": false,
180
- "notNull": false
181
- },
182
- "attributes": {
183
- "name": "attributes",
184
- "type": "jsonb",
185
- "primaryKey": false,
186
- "notNull": true,
187
- "default": "'{}'::jsonb"
188
- }
189
- },
190
- "indexes": {},
191
- "foreignKeys": {},
192
- "compositePrimaryKeys": {},
193
- "uniqueConstraints": {
194
- "document_category_label_unique": {
195
- "name": "document_category_label_unique",
196
- "nullsNotDistinct": false,
197
- "columns": [
198
- "label"
199
- ]
200
- }
201
- },
202
- "policies": {},
203
- "checkConstraints": {},
204
- "isRLSEnabled": false
205
- },
206
- "document_management.document_collection": {
207
- "name": "document_collection",
208
- "schema": "document_management",
209
- "columns": {
210
- "id": {
211
- "name": "id",
212
- "type": "uuid",
213
- "primaryKey": true,
214
- "notNull": true,
215
- "default": "gen_random_uuid()"
216
- },
217
- "revision": {
218
- "name": "revision",
219
- "type": "integer",
220
- "primaryKey": false,
221
- "notNull": true
222
- },
223
- "revision_timestamp": {
224
- "name": "revision_timestamp",
225
- "type": "timestamp with time zone",
226
- "primaryKey": false,
227
- "notNull": true
228
- },
229
- "create_timestamp": {
230
- "name": "create_timestamp",
231
- "type": "timestamp with time zone",
232
- "primaryKey": false,
233
- "notNull": true
234
- },
235
- "delete_timestamp": {
236
- "name": "delete_timestamp",
237
- "type": "timestamp with time zone",
238
- "primaryKey": false,
239
- "notNull": false
240
- },
241
- "attributes": {
242
- "name": "attributes",
243
- "type": "jsonb",
244
- "primaryKey": false,
245
- "notNull": true,
246
- "default": "'{}'::jsonb"
247
- }
248
- },
249
- "indexes": {},
250
- "foreignKeys": {},
251
- "compositePrimaryKeys": {},
252
- "uniqueConstraints": {},
253
- "policies": {},
254
- "checkConstraints": {},
255
- "isRLSEnabled": false
256
- },
257
- "document_management.document_collection_document": {
258
- "name": "document_collection_document",
259
- "schema": "document_management",
260
- "columns": {
261
- "id": {
262
- "name": "id",
263
- "type": "uuid",
264
- "primaryKey": true,
265
- "notNull": true,
266
- "default": "gen_random_uuid()"
267
- },
268
- "collection_id": {
269
- "name": "collection_id",
270
- "type": "uuid",
271
- "primaryKey": false,
272
- "notNull": true
273
- },
274
- "document_id": {
275
- "name": "document_id",
276
- "type": "uuid",
277
- "primaryKey": false,
278
- "notNull": true
279
- },
280
- "archive_timestamp": {
281
- "name": "archive_timestamp",
282
- "type": "timestamp with time zone",
283
- "primaryKey": false,
284
- "notNull": false
285
- },
286
- "revision": {
287
- "name": "revision",
288
- "type": "integer",
289
- "primaryKey": false,
290
- "notNull": true
291
- },
292
- "revision_timestamp": {
293
- "name": "revision_timestamp",
294
- "type": "timestamp with time zone",
295
- "primaryKey": false,
296
- "notNull": true
297
- },
298
- "create_timestamp": {
299
- "name": "create_timestamp",
300
- "type": "timestamp with time zone",
301
- "primaryKey": false,
302
- "notNull": true
303
- },
304
- "delete_timestamp": {
305
- "name": "delete_timestamp",
306
- "type": "timestamp with time zone",
307
- "primaryKey": false,
308
- "notNull": false
309
- },
310
- "attributes": {
311
- "name": "attributes",
312
- "type": "jsonb",
313
- "primaryKey": false,
314
- "notNull": true,
315
- "default": "'{}'::jsonb"
316
- }
317
- },
318
- "indexes": {},
319
- "foreignKeys": {
320
- "document_collection_document_collection_id_document_collection_id_fk": {
321
- "name": "document_collection_document_collection_id_document_collection_id_fk",
322
- "tableFrom": "document_collection_document",
323
- "tableTo": "document_collection",
324
- "schemaTo": "document_management",
325
- "columnsFrom": [
326
- "collection_id"
327
- ],
328
- "columnsTo": [
329
- "id"
330
- ],
331
- "onDelete": "no action",
332
- "onUpdate": "no action"
333
- },
334
- "document_collection_document_document_id_document_id_fk": {
335
- "name": "document_collection_document_document_id_document_id_fk",
336
- "tableFrom": "document_collection_document",
337
- "tableTo": "document",
338
- "schemaTo": "document_management",
339
- "columnsFrom": [
340
- "document_id"
341
- ],
342
- "columnsTo": [
343
- "id"
344
- ],
345
- "onDelete": "no action",
346
- "onUpdate": "no action"
347
- }
348
- },
349
- "compositePrimaryKeys": {},
350
- "uniqueConstraints": {
351
- "document_collection_document_collection_id_document_id_unique": {
352
- "name": "document_collection_document_collection_id_document_id_unique",
353
- "nullsNotDistinct": false,
354
- "columns": [
355
- "collection_id",
356
- "document_id"
357
- ]
358
- }
359
- },
360
- "policies": {},
361
- "checkConstraints": {},
362
- "isRLSEnabled": false
363
- },
364
- "document_management.document_file": {
365
- "name": "document_file",
366
- "schema": "document_management",
367
- "columns": {
368
- "id": {
369
- "name": "id",
370
- "type": "uuid",
371
- "primaryKey": true,
372
- "notNull": true,
373
- "default": "gen_random_uuid()"
374
- },
375
- "original_file_name": {
376
- "name": "original_file_name",
377
- "type": "text",
378
- "primaryKey": false,
379
- "notNull": false
380
- },
381
- "mime_type": {
382
- "name": "mime_type",
383
- "type": "text",
384
- "primaryKey": false,
385
- "notNull": true
386
- },
387
- "hash": {
388
- "name": "hash",
389
- "type": "text",
390
- "primaryKey": false,
391
- "notNull": true
392
- },
393
- "size": {
394
- "name": "size",
395
- "type": "integer",
396
- "primaryKey": false,
397
- "notNull": true
398
- },
399
- "revision": {
400
- "name": "revision",
401
- "type": "integer",
402
- "primaryKey": false,
403
- "notNull": true
404
- },
405
- "revision_timestamp": {
406
- "name": "revision_timestamp",
407
- "type": "timestamp with time zone",
408
- "primaryKey": false,
409
- "notNull": true
410
- },
411
- "create_timestamp": {
412
- "name": "create_timestamp",
413
- "type": "timestamp with time zone",
414
- "primaryKey": false,
415
- "notNull": true
416
- },
417
- "delete_timestamp": {
418
- "name": "delete_timestamp",
419
- "type": "timestamp with time zone",
420
- "primaryKey": false,
421
- "notNull": false
422
- },
423
- "attributes": {
424
- "name": "attributes",
425
- "type": "jsonb",
426
- "primaryKey": false,
427
- "notNull": true,
428
- "default": "'{}'::jsonb"
429
- }
430
- },
431
- "indexes": {},
432
- "foreignKeys": {},
433
- "compositePrimaryKeys": {},
434
- "uniqueConstraints": {},
435
- "policies": {},
436
- "checkConstraints": {},
437
- "isRLSEnabled": false
438
- },
439
- "document_management.document_property": {
440
- "name": "document_property",
441
- "schema": "document_management",
442
- "columns": {
443
- "id": {
444
- "name": "id",
445
- "type": "uuid",
446
- "primaryKey": true,
447
- "notNull": true,
448
- "default": "gen_random_uuid()"
449
- },
450
- "label": {
451
- "name": "label",
452
- "type": "text",
453
- "primaryKey": false,
454
- "notNull": true
455
- },
456
- "data_type": {
457
- "name": "data_type",
458
- "type": "document_property_data_type",
459
- "typeSchema": "document_management",
460
- "primaryKey": false,
461
- "notNull": true
462
- },
463
- "revision": {
464
- "name": "revision",
465
- "type": "integer",
466
- "primaryKey": false,
467
- "notNull": true
468
- },
469
- "revision_timestamp": {
470
- "name": "revision_timestamp",
471
- "type": "timestamp with time zone",
472
- "primaryKey": false,
473
- "notNull": true
474
- },
475
- "create_timestamp": {
476
- "name": "create_timestamp",
477
- "type": "timestamp with time zone",
478
- "primaryKey": false,
479
- "notNull": true
480
- },
481
- "delete_timestamp": {
482
- "name": "delete_timestamp",
483
- "type": "timestamp with time zone",
484
- "primaryKey": false,
485
- "notNull": false
486
- },
487
- "attributes": {
488
- "name": "attributes",
489
- "type": "jsonb",
490
- "primaryKey": false,
491
- "notNull": true,
492
- "default": "'{}'::jsonb"
493
- }
494
- },
495
- "indexes": {},
496
- "foreignKeys": {},
497
- "compositePrimaryKeys": {},
498
- "uniqueConstraints": {
499
- "document_property_label_unique": {
500
- "name": "document_property_label_unique",
501
- "nullsNotDistinct": false,
502
- "columns": [
503
- "label"
504
- ]
505
- }
506
- },
507
- "policies": {},
508
- "checkConstraints": {},
509
- "isRLSEnabled": false
510
- },
511
- "document_management.document_property_value": {
512
- "name": "document_property_value",
513
- "schema": "document_management",
514
- "columns": {
515
- "id": {
516
- "name": "id",
517
- "type": "uuid",
518
- "primaryKey": true,
519
- "notNull": true,
520
- "default": "gen_random_uuid()"
521
- },
522
- "property_id": {
523
- "name": "property_id",
524
- "type": "uuid",
525
- "primaryKey": false,
526
- "notNull": true
527
- },
528
- "text": {
529
- "name": "text",
530
- "type": "text",
531
- "primaryKey": false,
532
- "notNull": false
533
- },
534
- "integer": {
535
- "name": "integer",
536
- "type": "integer",
537
- "primaryKey": false,
538
- "notNull": false
539
- },
540
- "decimal": {
541
- "name": "decimal",
542
- "type": "double precision",
543
- "primaryKey": false,
544
- "notNull": false
545
- },
546
- "boolean": {
547
- "name": "boolean",
548
- "type": "boolean",
549
- "primaryKey": false,
550
- "notNull": false
551
- },
552
- "date": {
553
- "name": "date",
554
- "type": "date",
555
- "primaryKey": false,
556
- "notNull": false
557
- },
558
- "document_id": {
559
- "name": "document_id",
560
- "type": "uuid",
561
- "primaryKey": false,
562
- "notNull": true
563
- },
564
- "revision": {
565
- "name": "revision",
566
- "type": "integer",
567
- "primaryKey": false,
568
- "notNull": true
569
- },
570
- "revision_timestamp": {
571
- "name": "revision_timestamp",
572
- "type": "timestamp with time zone",
573
- "primaryKey": false,
574
- "notNull": true
575
- },
576
- "create_timestamp": {
577
- "name": "create_timestamp",
578
- "type": "timestamp with time zone",
579
- "primaryKey": false,
580
- "notNull": true
581
- },
582
- "delete_timestamp": {
583
- "name": "delete_timestamp",
584
- "type": "timestamp with time zone",
585
- "primaryKey": false,
586
- "notNull": false
587
- },
588
- "attributes": {
589
- "name": "attributes",
590
- "type": "jsonb",
591
- "primaryKey": false,
592
- "notNull": true,
593
- "default": "'{}'::jsonb"
594
- }
595
- },
596
- "indexes": {},
597
- "foreignKeys": {
598
- "document_property_value_property_id_document_property_id_fk": {
599
- "name": "document_property_value_property_id_document_property_id_fk",
600
- "tableFrom": "document_property_value",
601
- "tableTo": "document_property",
602
- "schemaTo": "document_management",
603
- "columnsFrom": [
604
- "property_id"
605
- ],
606
- "columnsTo": [
607
- "id"
608
- ],
609
- "onDelete": "no action",
610
- "onUpdate": "no action"
611
- },
612
- "document_property_value_document_id_document_id_fk": {
613
- "name": "document_property_value_document_id_document_id_fk",
614
- "tableFrom": "document_property_value",
615
- "tableTo": "document",
616
- "schemaTo": "document_management",
617
- "columnsFrom": [
618
- "document_id"
619
- ],
620
- "columnsTo": [
621
- "id"
622
- ],
623
- "onDelete": "no action",
624
- "onUpdate": "no action"
625
- }
626
- },
627
- "compositePrimaryKeys": {},
628
- "uniqueConstraints": {
629
- "document_property_value_document_id_property_id_unique": {
630
- "name": "document_property_value_document_id_property_id_unique",
631
- "nullsNotDistinct": false,
632
- "columns": [
633
- "document_id",
634
- "property_id"
635
- ]
636
- }
637
- },
638
- "policies": {},
639
- "checkConstraints": {
640
- "only_one_value": {
641
- "name": "only_one_value",
642
- "value": "num_nonnulls(\"document_management\".\"document_property_value\".\"text\", \"document_management\".\"document_property_value\".\"integer\", \"document_management\".\"document_property_value\".\"decimal\", \"document_management\".\"document_property_value\".\"boolean\", \"document_management\".\"document_property_value\".\"date\") = 1"
643
- }
644
- },
645
- "isRLSEnabled": false
646
- },
647
- "document_management.document_request": {
648
- "name": "document_request",
649
- "schema": "document_management",
650
- "columns": {
651
- "id": {
652
- "name": "id",
653
- "type": "uuid",
654
- "primaryKey": true,
655
- "notNull": true,
656
- "default": "gen_random_uuid()"
657
- },
658
- "type_id": {
659
- "name": "type_id",
660
- "type": "uuid",
661
- "primaryKey": false,
662
- "notNull": false
663
- },
664
- "required_files_count": {
665
- "name": "required_files_count",
666
- "type": "integer",
667
- "primaryKey": false,
668
- "notNull": true
669
- },
670
- "comment": {
671
- "name": "comment",
672
- "type": "text",
673
- "primaryKey": false,
674
- "notNull": false
675
- },
676
- "completed": {
677
- "name": "completed",
678
- "type": "boolean",
679
- "primaryKey": false,
680
- "notNull": true
681
- },
682
- "revision": {
683
- "name": "revision",
684
- "type": "integer",
685
- "primaryKey": false,
686
- "notNull": true
687
- },
688
- "revision_timestamp": {
689
- "name": "revision_timestamp",
690
- "type": "timestamp with time zone",
691
- "primaryKey": false,
692
- "notNull": true
693
- },
694
- "create_timestamp": {
695
- "name": "create_timestamp",
696
- "type": "timestamp with time zone",
697
- "primaryKey": false,
698
- "notNull": true
699
- },
700
- "delete_timestamp": {
701
- "name": "delete_timestamp",
702
- "type": "timestamp with time zone",
703
- "primaryKey": false,
704
- "notNull": false
705
- },
706
- "attributes": {
707
- "name": "attributes",
708
- "type": "jsonb",
709
- "primaryKey": false,
710
- "notNull": true,
711
- "default": "'{}'::jsonb"
712
- }
713
- },
714
- "indexes": {},
715
- "foreignKeys": {
716
- "document_request_type_id_document_type_id_fk": {
717
- "name": "document_request_type_id_document_type_id_fk",
718
- "tableFrom": "document_request",
719
- "tableTo": "document_type",
720
- "schemaTo": "document_management",
721
- "columnsFrom": [
722
- "type_id"
723
- ],
724
- "columnsTo": [
725
- "id"
726
- ],
727
- "onDelete": "no action",
728
- "onUpdate": "no action"
729
- }
730
- },
731
- "compositePrimaryKeys": {},
732
- "uniqueConstraints": {},
733
- "policies": {},
734
- "checkConstraints": {},
735
- "isRLSEnabled": false
736
- },
737
- "document_management.document_request_assignment_task": {
738
- "name": "document_request_assignment_task",
739
- "schema": "document_management",
740
- "columns": {
741
- "id": {
742
- "name": "id",
743
- "type": "uuid",
744
- "primaryKey": true,
745
- "notNull": true,
746
- "default": "gen_random_uuid()"
747
- },
748
- "file_id": {
749
- "name": "file_id",
750
- "type": "uuid",
751
- "primaryKey": false,
752
- "notNull": true
753
- },
754
- "assigned_request_file_id": {
755
- "name": "assigned_request_file_id",
756
- "type": "uuid",
757
- "primaryKey": false,
758
- "notNull": false
759
- },
760
- "type_id": {
761
- "name": "type_id",
762
- "type": "uuid",
763
- "primaryKey": false,
764
- "notNull": false
765
- },
766
- "title": {
767
- "name": "title",
768
- "type": "text",
769
- "primaryKey": false,
770
- "notNull": false
771
- },
772
- "subtitle": {
773
- "name": "subtitle",
774
- "type": "text",
775
- "primaryKey": false,
776
- "notNull": false
777
- },
778
- "pages": {
779
- "name": "pages",
780
- "type": "integer",
781
- "primaryKey": false,
782
- "notNull": false
783
- },
784
- "date": {
785
- "name": "date",
786
- "type": "date",
787
- "primaryKey": false,
788
- "notNull": false
789
- },
790
- "summary": {
791
- "name": "summary",
792
- "type": "text",
793
- "primaryKey": false,
794
- "notNull": false
795
- },
796
- "tags": {
797
- "name": "tags",
798
- "type": "text[]",
799
- "primaryKey": false,
800
- "notNull": false
801
- },
802
- "assignment_tries": {
803
- "name": "assignment_tries",
804
- "type": "integer",
805
- "primaryKey": false,
806
- "notNull": true
807
- },
808
- "revision": {
809
- "name": "revision",
810
- "type": "integer",
811
- "primaryKey": false,
812
- "notNull": true
813
- },
814
- "revision_timestamp": {
815
- "name": "revision_timestamp",
816
- "type": "timestamp with time zone",
817
- "primaryKey": false,
818
- "notNull": true
819
- },
820
- "create_timestamp": {
821
- "name": "create_timestamp",
822
- "type": "timestamp with time zone",
823
- "primaryKey": false,
824
- "notNull": true
825
- },
826
- "delete_timestamp": {
827
- "name": "delete_timestamp",
828
- "type": "timestamp with time zone",
829
- "primaryKey": false,
830
- "notNull": false
831
- },
832
- "attributes": {
833
- "name": "attributes",
834
- "type": "jsonb",
835
- "primaryKey": false,
836
- "notNull": true,
837
- "default": "'{}'::jsonb"
838
- }
839
- },
840
- "indexes": {},
841
- "foreignKeys": {
842
- "document_request_assignment_task_file_id_document_file_id_fk": {
843
- "name": "document_request_assignment_task_file_id_document_file_id_fk",
844
- "tableFrom": "document_request_assignment_task",
845
- "tableTo": "document_file",
846
- "schemaTo": "document_management",
847
- "columnsFrom": [
848
- "file_id"
849
- ],
850
- "columnsTo": [
851
- "id"
852
- ],
853
- "onDelete": "no action",
854
- "onUpdate": "no action"
855
- },
856
- "document_request_assignment_task_assigned_request_file_id_document_request_file_id_fk": {
857
- "name": "document_request_assignment_task_assigned_request_file_id_document_request_file_id_fk",
858
- "tableFrom": "document_request_assignment_task",
859
- "tableTo": "document_request_file",
860
- "schemaTo": "document_management",
861
- "columnsFrom": [
862
- "assigned_request_file_id"
863
- ],
864
- "columnsTo": [
865
- "id"
866
- ],
867
- "onDelete": "no action",
868
- "onUpdate": "no action"
869
- },
870
- "document_request_assignment_task_type_id_document_type_id_fk": {
871
- "name": "document_request_assignment_task_type_id_document_type_id_fk",
872
- "tableFrom": "document_request_assignment_task",
873
- "tableTo": "document_type",
874
- "schemaTo": "document_management",
875
- "columnsFrom": [
876
- "type_id"
877
- ],
878
- "columnsTo": [
879
- "id"
880
- ],
881
- "onDelete": "no action",
882
- "onUpdate": "no action"
883
- }
884
- },
885
- "compositePrimaryKeys": {},
886
- "uniqueConstraints": {
887
- "drat_file_id_unique": {
888
- "name": "drat_file_id_unique",
889
- "nullsNotDistinct": false,
890
- "columns": [
891
- "file_id"
892
- ]
893
- }
894
- },
895
- "policies": {},
896
- "checkConstraints": {},
897
- "isRLSEnabled": false
898
- },
899
- "document_management.document_request_assignment_task_collection": {
900
- "name": "document_request_assignment_task_collection",
901
- "schema": "document_management",
902
- "columns": {
903
- "id": {
904
- "name": "id",
905
- "type": "uuid",
906
- "primaryKey": true,
907
- "notNull": true,
908
- "default": "gen_random_uuid()"
909
- },
910
- "request_assignment_task_id": {
911
- "name": "request_assignment_task_id",
912
- "type": "uuid",
913
- "primaryKey": false,
914
- "notNull": true
915
- },
916
- "collection_id": {
917
- "name": "collection_id",
918
- "type": "uuid",
919
- "primaryKey": false,
920
- "notNull": true
921
- },
922
- "revision": {
923
- "name": "revision",
924
- "type": "integer",
925
- "primaryKey": false,
926
- "notNull": true
927
- },
928
- "revision_timestamp": {
929
- "name": "revision_timestamp",
930
- "type": "timestamp with time zone",
931
- "primaryKey": false,
932
- "notNull": true
933
- },
934
- "create_timestamp": {
935
- "name": "create_timestamp",
936
- "type": "timestamp with time zone",
937
- "primaryKey": false,
938
- "notNull": true
939
- },
940
- "delete_timestamp": {
941
- "name": "delete_timestamp",
942
- "type": "timestamp with time zone",
943
- "primaryKey": false,
944
- "notNull": false
945
- },
946
- "attributes": {
947
- "name": "attributes",
948
- "type": "jsonb",
949
- "primaryKey": false,
950
- "notNull": true,
951
- "default": "'{}'::jsonb"
952
- }
953
- },
954
- "indexes": {},
955
- "foreignKeys": {
956
- "document_request_assignment_task_collection_request_assignment_task_id_document_request_assignment_task_id_fk": {
957
- "name": "document_request_assignment_task_collection_request_assignment_task_id_document_request_assignment_task_id_fk",
958
- "tableFrom": "document_request_assignment_task_collection",
959
- "tableTo": "document_request_assignment_task",
960
- "schemaTo": "document_management",
961
- "columnsFrom": [
962
- "request_assignment_task_id"
963
- ],
964
- "columnsTo": [
965
- "id"
966
- ],
967
- "onDelete": "no action",
968
- "onUpdate": "no action"
969
- },
970
- "document_request_assignment_task_collection_collection_id_document_collection_id_fk": {
971
- "name": "document_request_assignment_task_collection_collection_id_document_collection_id_fk",
972
- "tableFrom": "document_request_assignment_task_collection",
973
- "tableTo": "document_collection",
974
- "schemaTo": "document_management",
975
- "columnsFrom": [
976
- "collection_id"
977
- ],
978
- "columnsTo": [
979
- "id"
980
- ],
981
- "onDelete": "no action",
982
- "onUpdate": "no action"
983
- }
984
- },
985
- "compositePrimaryKeys": {},
986
- "uniqueConstraints": {
987
- "dratc_request_assignment_task_id_collection_id_unique": {
988
- "name": "dratc_request_assignment_task_id_collection_id_unique",
989
- "nullsNotDistinct": false,
990
- "columns": [
991
- "request_assignment_task_id",
992
- "collection_id"
993
- ]
994
- }
995
- },
996
- "policies": {},
997
- "checkConstraints": {},
998
- "isRLSEnabled": false
999
- },
1000
- "document_management.document_request_assignment_task_property_value": {
1001
- "name": "document_request_assignment_task_property_value",
1002
- "schema": "document_management",
1003
- "columns": {
1004
- "id": {
1005
- "name": "id",
1006
- "type": "uuid",
1007
- "primaryKey": true,
1008
- "notNull": true,
1009
- "default": "gen_random_uuid()"
1010
- },
1011
- "property_id": {
1012
- "name": "property_id",
1013
- "type": "uuid",
1014
- "primaryKey": false,
1015
- "notNull": true
1016
- },
1017
- "text": {
1018
- "name": "text",
1019
- "type": "text",
1020
- "primaryKey": false,
1021
- "notNull": false
1022
- },
1023
- "integer": {
1024
- "name": "integer",
1025
- "type": "integer",
1026
- "primaryKey": false,
1027
- "notNull": false
1028
- },
1029
- "decimal": {
1030
- "name": "decimal",
1031
- "type": "double precision",
1032
- "primaryKey": false,
1033
- "notNull": false
1034
- },
1035
- "boolean": {
1036
- "name": "boolean",
1037
- "type": "boolean",
1038
- "primaryKey": false,
1039
- "notNull": false
1040
- },
1041
- "date": {
1042
- "name": "date",
1043
- "type": "date",
1044
- "primaryKey": false,
1045
- "notNull": false
1046
- },
1047
- "request_assignment_task_id": {
1048
- "name": "request_assignment_task_id",
1049
- "type": "uuid",
1050
- "primaryKey": false,
1051
- "notNull": true
1052
- },
1053
- "revision": {
1054
- "name": "revision",
1055
- "type": "integer",
1056
- "primaryKey": false,
1057
- "notNull": true
1058
- },
1059
- "revision_timestamp": {
1060
- "name": "revision_timestamp",
1061
- "type": "timestamp with time zone",
1062
- "primaryKey": false,
1063
- "notNull": true
1064
- },
1065
- "create_timestamp": {
1066
- "name": "create_timestamp",
1067
- "type": "timestamp with time zone",
1068
- "primaryKey": false,
1069
- "notNull": true
1070
- },
1071
- "delete_timestamp": {
1072
- "name": "delete_timestamp",
1073
- "type": "timestamp with time zone",
1074
- "primaryKey": false,
1075
- "notNull": false
1076
- },
1077
- "attributes": {
1078
- "name": "attributes",
1079
- "type": "jsonb",
1080
- "primaryKey": false,
1081
- "notNull": true,
1082
- "default": "'{}'::jsonb"
1083
- }
1084
- },
1085
- "indexes": {},
1086
- "foreignKeys": {
1087
- "document_request_assignment_task_property_value_property_id_document_property_id_fk": {
1088
- "name": "document_request_assignment_task_property_value_property_id_document_property_id_fk",
1089
- "tableFrom": "document_request_assignment_task_property_value",
1090
- "tableTo": "document_property",
1091
- "schemaTo": "document_management",
1092
- "columnsFrom": [
1093
- "property_id"
1094
- ],
1095
- "columnsTo": [
1096
- "id"
1097
- ],
1098
- "onDelete": "no action",
1099
- "onUpdate": "no action"
1100
- },
1101
- "document_request_assignment_task_property_value_request_assignment_task_id_document_request_assignment_task_id_fk": {
1102
- "name": "document_request_assignment_task_property_value_request_assignment_task_id_document_request_assignment_task_id_fk",
1103
- "tableFrom": "document_request_assignment_task_property_value",
1104
- "tableTo": "document_request_assignment_task",
1105
- "schemaTo": "document_management",
1106
- "columnsFrom": [
1107
- "request_assignment_task_id"
1108
- ],
1109
- "columnsTo": [
1110
- "id"
1111
- ],
1112
- "onDelete": "no action",
1113
- "onUpdate": "no action"
1114
- }
1115
- },
1116
- "compositePrimaryKeys": {},
1117
- "uniqueConstraints": {
1118
- "dratpv_request_assignment_task_id_property_id_unique": {
1119
- "name": "dratpv_request_assignment_task_id_property_id_unique",
1120
- "nullsNotDistinct": false,
1121
- "columns": [
1122
- "request_assignment_task_id",
1123
- "property_id"
1124
- ]
1125
- }
1126
- },
1127
- "policies": {},
1128
- "checkConstraints": {
1129
- "only_one_value": {
1130
- "name": "only_one_value",
1131
- "value": "num_nonnulls(\"document_management\".\"document_request_assignment_task_property_value\".\"text\", \"document_management\".\"document_request_assignment_task_property_value\".\"integer\", \"document_management\".\"document_request_assignment_task_property_value\".\"decimal\", \"document_management\".\"document_request_assignment_task_property_value\".\"boolean\", \"document_management\".\"document_request_assignment_task_property_value\".\"date\") = 1"
1132
- }
1133
- },
1134
- "isRLSEnabled": false
1135
- },
1136
- "document_management.document_request_collection": {
1137
- "name": "document_request_collection",
1138
- "schema": "document_management",
1139
- "columns": {
1140
- "id": {
1141
- "name": "id",
1142
- "type": "uuid",
1143
- "primaryKey": true,
1144
- "notNull": true,
1145
- "default": "gen_random_uuid()"
1146
- },
1147
- "request_id": {
1148
- "name": "request_id",
1149
- "type": "uuid",
1150
- "primaryKey": false,
1151
- "notNull": true
1152
- },
1153
- "collection_id": {
1154
- "name": "collection_id",
1155
- "type": "uuid",
1156
- "primaryKey": false,
1157
- "notNull": true
1158
- },
1159
- "revision": {
1160
- "name": "revision",
1161
- "type": "integer",
1162
- "primaryKey": false,
1163
- "notNull": true
1164
- },
1165
- "revision_timestamp": {
1166
- "name": "revision_timestamp",
1167
- "type": "timestamp with time zone",
1168
- "primaryKey": false,
1169
- "notNull": true
1170
- },
1171
- "create_timestamp": {
1172
- "name": "create_timestamp",
1173
- "type": "timestamp with time zone",
1174
- "primaryKey": false,
1175
- "notNull": true
1176
- },
1177
- "delete_timestamp": {
1178
- "name": "delete_timestamp",
1179
- "type": "timestamp with time zone",
1180
- "primaryKey": false,
1181
- "notNull": false
1182
- },
1183
- "attributes": {
1184
- "name": "attributes",
1185
- "type": "jsonb",
1186
- "primaryKey": false,
1187
- "notNull": true,
1188
- "default": "'{}'::jsonb"
1189
- }
1190
- },
1191
- "indexes": {},
1192
- "foreignKeys": {
1193
- "document_request_collection_request_id_document_request_id_fk": {
1194
- "name": "document_request_collection_request_id_document_request_id_fk",
1195
- "tableFrom": "document_request_collection",
1196
- "tableTo": "document_request",
1197
- "schemaTo": "document_management",
1198
- "columnsFrom": [
1199
- "request_id"
1200
- ],
1201
- "columnsTo": [
1202
- "id"
1203
- ],
1204
- "onDelete": "no action",
1205
- "onUpdate": "no action"
1206
- },
1207
- "document_request_collection_collection_id_document_collection_id_fk": {
1208
- "name": "document_request_collection_collection_id_document_collection_id_fk",
1209
- "tableFrom": "document_request_collection",
1210
- "tableTo": "document_collection",
1211
- "schemaTo": "document_management",
1212
- "columnsFrom": [
1213
- "collection_id"
1214
- ],
1215
- "columnsTo": [
1216
- "id"
1217
- ],
1218
- "onDelete": "no action",
1219
- "onUpdate": "no action"
1220
- }
1221
- },
1222
- "compositePrimaryKeys": {},
1223
- "uniqueConstraints": {
1224
- "document_request_collection_request_id_collection_id_unique": {
1225
- "name": "document_request_collection_request_id_collection_id_unique",
1226
- "nullsNotDistinct": false,
1227
- "columns": [
1228
- "request_id",
1229
- "collection_id"
1230
- ]
1231
- }
1232
- },
1233
- "policies": {},
1234
- "checkConstraints": {},
1235
- "isRLSEnabled": false
1236
- },
1237
- "document_management.document_request_file": {
1238
- "name": "document_request_file",
1239
- "schema": "document_management",
1240
- "columns": {
1241
- "id": {
1242
- "name": "id",
1243
- "type": "uuid",
1244
- "primaryKey": true,
1245
- "notNull": true,
1246
- "default": "gen_random_uuid()"
1247
- },
1248
- "request_id": {
1249
- "name": "request_id",
1250
- "type": "uuid",
1251
- "primaryKey": false,
1252
- "notNull": true
1253
- },
1254
- "file_id": {
1255
- "name": "file_id",
1256
- "type": "uuid",
1257
- "primaryKey": false,
1258
- "notNull": true
1259
- },
1260
- "title": {
1261
- "name": "title",
1262
- "type": "text",
1263
- "primaryKey": false,
1264
- "notNull": false
1265
- },
1266
- "subtitle": {
1267
- "name": "subtitle",
1268
- "type": "text",
1269
- "primaryKey": false,
1270
- "notNull": false
1271
- },
1272
- "pages": {
1273
- "name": "pages",
1274
- "type": "integer",
1275
- "primaryKey": false,
1276
- "notNull": false
1277
- },
1278
- "date": {
1279
- "name": "date",
1280
- "type": "date",
1281
- "primaryKey": false,
1282
- "notNull": false
1283
- },
1284
- "summary": {
1285
- "name": "summary",
1286
- "type": "text",
1287
- "primaryKey": false,
1288
- "notNull": false
1289
- },
1290
- "tags": {
1291
- "name": "tags",
1292
- "type": "text[]",
1293
- "primaryKey": false,
1294
- "notNull": false
1295
- },
1296
- "created_document_id": {
1297
- "name": "created_document_id",
1298
- "type": "uuid",
1299
- "primaryKey": false,
1300
- "notNull": false
1301
- },
1302
- "approval": {
1303
- "name": "approval",
1304
- "type": "boolean",
1305
- "primaryKey": false,
1306
- "notNull": false
1307
- },
1308
- "approval_comment": {
1309
- "name": "approval_comment",
1310
- "type": "text",
1311
- "primaryKey": false,
1312
- "notNull": false
1313
- },
1314
- "approval_timestamp": {
1315
- "name": "approval_timestamp",
1316
- "type": "timestamp with time zone",
1317
- "primaryKey": false,
1318
- "notNull": false
1319
- },
1320
- "revision": {
1321
- "name": "revision",
1322
- "type": "integer",
1323
- "primaryKey": false,
1324
- "notNull": true
1325
- },
1326
- "revision_timestamp": {
1327
- "name": "revision_timestamp",
1328
- "type": "timestamp with time zone",
1329
- "primaryKey": false,
1330
- "notNull": true
1331
- },
1332
- "create_timestamp": {
1333
- "name": "create_timestamp",
1334
- "type": "timestamp with time zone",
1335
- "primaryKey": false,
1336
- "notNull": true
1337
- },
1338
- "delete_timestamp": {
1339
- "name": "delete_timestamp",
1340
- "type": "timestamp with time zone",
1341
- "primaryKey": false,
1342
- "notNull": false
1343
- },
1344
- "attributes": {
1345
- "name": "attributes",
1346
- "type": "jsonb",
1347
- "primaryKey": false,
1348
- "notNull": true,
1349
- "default": "'{}'::jsonb"
1350
- }
1351
- },
1352
- "indexes": {},
1353
- "foreignKeys": {
1354
- "document_request_file_request_id_document_request_id_fk": {
1355
- "name": "document_request_file_request_id_document_request_id_fk",
1356
- "tableFrom": "document_request_file",
1357
- "tableTo": "document_request",
1358
- "schemaTo": "document_management",
1359
- "columnsFrom": [
1360
- "request_id"
1361
- ],
1362
- "columnsTo": [
1363
- "id"
1364
- ],
1365
- "onDelete": "no action",
1366
- "onUpdate": "no action"
1367
- },
1368
- "document_request_file_file_id_document_file_id_fk": {
1369
- "name": "document_request_file_file_id_document_file_id_fk",
1370
- "tableFrom": "document_request_file",
1371
- "tableTo": "document_file",
1372
- "schemaTo": "document_management",
1373
- "columnsFrom": [
1374
- "file_id"
1375
- ],
1376
- "columnsTo": [
1377
- "id"
1378
- ],
1379
- "onDelete": "no action",
1380
- "onUpdate": "no action"
1381
- },
1382
- "document_request_file_created_document_id_document_id_fk": {
1383
- "name": "document_request_file_created_document_id_document_id_fk",
1384
- "tableFrom": "document_request_file",
1385
- "tableTo": "document",
1386
- "schemaTo": "document_management",
1387
- "columnsFrom": [
1388
- "created_document_id"
1389
- ],
1390
- "columnsTo": [
1391
- "id"
1392
- ],
1393
- "onDelete": "no action",
1394
- "onUpdate": "no action"
1395
- }
1396
- },
1397
- "compositePrimaryKeys": {},
1398
- "uniqueConstraints": {},
1399
- "policies": {},
1400
- "checkConstraints": {},
1401
- "isRLSEnabled": false
1402
- },
1403
- "document_management.document_request_file_property_value": {
1404
- "name": "document_request_file_property_value",
1405
- "schema": "document_management",
1406
- "columns": {
1407
- "id": {
1408
- "name": "id",
1409
- "type": "uuid",
1410
- "primaryKey": true,
1411
- "notNull": true,
1412
- "default": "gen_random_uuid()"
1413
- },
1414
- "property_id": {
1415
- "name": "property_id",
1416
- "type": "uuid",
1417
- "primaryKey": false,
1418
- "notNull": true
1419
- },
1420
- "text": {
1421
- "name": "text",
1422
- "type": "text",
1423
- "primaryKey": false,
1424
- "notNull": false
1425
- },
1426
- "integer": {
1427
- "name": "integer",
1428
- "type": "integer",
1429
- "primaryKey": false,
1430
- "notNull": false
1431
- },
1432
- "decimal": {
1433
- "name": "decimal",
1434
- "type": "double precision",
1435
- "primaryKey": false,
1436
- "notNull": false
1437
- },
1438
- "boolean": {
1439
- "name": "boolean",
1440
- "type": "boolean",
1441
- "primaryKey": false,
1442
- "notNull": false
1443
- },
1444
- "date": {
1445
- "name": "date",
1446
- "type": "date",
1447
- "primaryKey": false,
1448
- "notNull": false
1449
- },
1450
- "request_file_id": {
1451
- "name": "request_file_id",
1452
- "type": "uuid",
1453
- "primaryKey": false,
1454
- "notNull": true
1455
- },
1456
- "revision": {
1457
- "name": "revision",
1458
- "type": "integer",
1459
- "primaryKey": false,
1460
- "notNull": true
1461
- },
1462
- "revision_timestamp": {
1463
- "name": "revision_timestamp",
1464
- "type": "timestamp with time zone",
1465
- "primaryKey": false,
1466
- "notNull": true
1467
- },
1468
- "create_timestamp": {
1469
- "name": "create_timestamp",
1470
- "type": "timestamp with time zone",
1471
- "primaryKey": false,
1472
- "notNull": true
1473
- },
1474
- "delete_timestamp": {
1475
- "name": "delete_timestamp",
1476
- "type": "timestamp with time zone",
1477
- "primaryKey": false,
1478
- "notNull": false
1479
- },
1480
- "attributes": {
1481
- "name": "attributes",
1482
- "type": "jsonb",
1483
- "primaryKey": false,
1484
- "notNull": true,
1485
- "default": "'{}'::jsonb"
1486
- }
1487
- },
1488
- "indexes": {},
1489
- "foreignKeys": {
1490
- "document_request_file_property_value_property_id_document_property_id_fk": {
1491
- "name": "document_request_file_property_value_property_id_document_property_id_fk",
1492
- "tableFrom": "document_request_file_property_value",
1493
- "tableTo": "document_property",
1494
- "schemaTo": "document_management",
1495
- "columnsFrom": [
1496
- "property_id"
1497
- ],
1498
- "columnsTo": [
1499
- "id"
1500
- ],
1501
- "onDelete": "no action",
1502
- "onUpdate": "no action"
1503
- },
1504
- "document_request_file_property_value_request_file_id_document_request_file_id_fk": {
1505
- "name": "document_request_file_property_value_request_file_id_document_request_file_id_fk",
1506
- "tableFrom": "document_request_file_property_value",
1507
- "tableTo": "document_request_file",
1508
- "schemaTo": "document_management",
1509
- "columnsFrom": [
1510
- "request_file_id"
1511
- ],
1512
- "columnsTo": [
1513
- "id"
1514
- ],
1515
- "onDelete": "no action",
1516
- "onUpdate": "no action"
1517
- }
1518
- },
1519
- "compositePrimaryKeys": {},
1520
- "uniqueConstraints": {
1521
- "drfpv_request_file_id_property_id_unique": {
1522
- "name": "drfpv_request_file_id_property_id_unique",
1523
- "nullsNotDistinct": false,
1524
- "columns": [
1525
- "request_file_id",
1526
- "property_id"
1527
- ]
1528
- }
1529
- },
1530
- "policies": {},
1531
- "checkConstraints": {
1532
- "only_one_value": {
1533
- "name": "only_one_value",
1534
- "value": "num_nonnulls(\"document_management\".\"document_request_file_property_value\".\"text\", \"document_management\".\"document_request_file_property_value\".\"integer\", \"document_management\".\"document_request_file_property_value\".\"decimal\", \"document_management\".\"document_request_file_property_value\".\"boolean\", \"document_management\".\"document_request_file_property_value\".\"date\") = 1"
1535
- }
1536
- },
1537
- "isRLSEnabled": false
1538
- },
1539
- "document_management.document_request_template": {
1540
- "name": "document_request_template",
1541
- "schema": "document_management",
1542
- "columns": {
1543
- "id": {
1544
- "name": "id",
1545
- "type": "uuid",
1546
- "primaryKey": true,
1547
- "notNull": true,
1548
- "default": "gen_random_uuid()"
1549
- },
1550
- "requests_template_id": {
1551
- "name": "requests_template_id",
1552
- "type": "uuid",
1553
- "primaryKey": false,
1554
- "notNull": true
1555
- },
1556
- "type_id": {
1557
- "name": "type_id",
1558
- "type": "uuid",
1559
- "primaryKey": false,
1560
- "notNull": false
1561
- },
1562
- "required_files_count": {
1563
- "name": "required_files_count",
1564
- "type": "integer",
1565
- "primaryKey": false,
1566
- "notNull": true
1567
- },
1568
- "comment": {
1569
- "name": "comment",
1570
- "type": "text",
1571
- "primaryKey": false,
1572
- "notNull": false
1573
- },
1574
- "revision": {
1575
- "name": "revision",
1576
- "type": "integer",
1577
- "primaryKey": false,
1578
- "notNull": true
1579
- },
1580
- "revision_timestamp": {
1581
- "name": "revision_timestamp",
1582
- "type": "timestamp with time zone",
1583
- "primaryKey": false,
1584
- "notNull": true
1585
- },
1586
- "create_timestamp": {
1587
- "name": "create_timestamp",
1588
- "type": "timestamp with time zone",
1589
- "primaryKey": false,
1590
- "notNull": true
1591
- },
1592
- "delete_timestamp": {
1593
- "name": "delete_timestamp",
1594
- "type": "timestamp with time zone",
1595
- "primaryKey": false,
1596
- "notNull": false
1597
- },
1598
- "attributes": {
1599
- "name": "attributes",
1600
- "type": "jsonb",
1601
- "primaryKey": false,
1602
- "notNull": true,
1603
- "default": "'{}'::jsonb"
1604
- }
1605
- },
1606
- "indexes": {},
1607
- "foreignKeys": {
1608
- "document_request_template_requests_template_id_document_requests_template_id_fk": {
1609
- "name": "document_request_template_requests_template_id_document_requests_template_id_fk",
1610
- "tableFrom": "document_request_template",
1611
- "tableTo": "document_requests_template",
1612
- "schemaTo": "document_management",
1613
- "columnsFrom": [
1614
- "requests_template_id"
1615
- ],
1616
- "columnsTo": [
1617
- "id"
1618
- ],
1619
- "onDelete": "no action",
1620
- "onUpdate": "no action"
1621
- },
1622
- "document_request_template_type_id_document_type_id_fk": {
1623
- "name": "document_request_template_type_id_document_type_id_fk",
1624
- "tableFrom": "document_request_template",
1625
- "tableTo": "document_type",
1626
- "schemaTo": "document_management",
1627
- "columnsFrom": [
1628
- "type_id"
1629
- ],
1630
- "columnsTo": [
1631
- "id"
1632
- ],
1633
- "onDelete": "no action",
1634
- "onUpdate": "no action"
1635
- }
1636
- },
1637
- "compositePrimaryKeys": {},
1638
- "uniqueConstraints": {},
1639
- "policies": {},
1640
- "checkConstraints": {},
1641
- "isRLSEnabled": false
1642
- },
1643
- "document_management.document_requests_template": {
1644
- "name": "document_requests_template",
1645
- "schema": "document_management",
1646
- "columns": {
1647
- "id": {
1648
- "name": "id",
1649
- "type": "uuid",
1650
- "primaryKey": true,
1651
- "notNull": true,
1652
- "default": "gen_random_uuid()"
1653
- },
1654
- "label": {
1655
- "name": "label",
1656
- "type": "text",
1657
- "primaryKey": false,
1658
- "notNull": true
1659
- },
1660
- "description": {
1661
- "name": "description",
1662
- "type": "text",
1663
- "primaryKey": false,
1664
- "notNull": false
1665
- },
1666
- "revision": {
1667
- "name": "revision",
1668
- "type": "integer",
1669
- "primaryKey": false,
1670
- "notNull": true
1671
- },
1672
- "revision_timestamp": {
1673
- "name": "revision_timestamp",
1674
- "type": "timestamp with time zone",
1675
- "primaryKey": false,
1676
- "notNull": true
1677
- },
1678
- "create_timestamp": {
1679
- "name": "create_timestamp",
1680
- "type": "timestamp with time zone",
1681
- "primaryKey": false,
1682
- "notNull": true
1683
- },
1684
- "delete_timestamp": {
1685
- "name": "delete_timestamp",
1686
- "type": "timestamp with time zone",
1687
- "primaryKey": false,
1688
- "notNull": false
1689
- },
1690
- "attributes": {
1691
- "name": "attributes",
1692
- "type": "jsonb",
1693
- "primaryKey": false,
1694
- "notNull": true,
1695
- "default": "'{}'::jsonb"
1696
- }
1697
- },
1698
- "indexes": {},
1699
- "foreignKeys": {},
1700
- "compositePrimaryKeys": {},
1701
- "uniqueConstraints": {
1702
- "document_requests_template_label_unique": {
1703
- "name": "document_requests_template_label_unique",
1704
- "nullsNotDistinct": false,
1705
- "columns": [
1706
- "label"
1707
- ]
1708
- }
1709
- },
1710
- "policies": {},
1711
- "checkConstraints": {},
1712
- "isRLSEnabled": false
1713
- },
1714
- "document_management.document_type": {
1715
- "name": "document_type",
1716
- "schema": "document_management",
1717
- "columns": {
1718
- "id": {
1719
- "name": "id",
1720
- "type": "uuid",
1721
- "primaryKey": true,
1722
- "notNull": true,
1723
- "default": "gen_random_uuid()"
1724
- },
1725
- "category_id": {
1726
- "name": "category_id",
1727
- "type": "uuid",
1728
- "primaryKey": false,
1729
- "notNull": true
1730
- },
1731
- "group": {
1732
- "name": "group",
1733
- "type": "text",
1734
- "primaryKey": false,
1735
- "notNull": false
1736
- },
1737
- "label": {
1738
- "name": "label",
1739
- "type": "text",
1740
- "primaryKey": false,
1741
- "notNull": true
1742
- },
1743
- "revision": {
1744
- "name": "revision",
1745
- "type": "integer",
1746
- "primaryKey": false,
1747
- "notNull": true
1748
- },
1749
- "revision_timestamp": {
1750
- "name": "revision_timestamp",
1751
- "type": "timestamp with time zone",
1752
- "primaryKey": false,
1753
- "notNull": true
1754
- },
1755
- "create_timestamp": {
1756
- "name": "create_timestamp",
1757
- "type": "timestamp with time zone",
1758
- "primaryKey": false,
1759
- "notNull": true
1760
- },
1761
- "delete_timestamp": {
1762
- "name": "delete_timestamp",
1763
- "type": "timestamp with time zone",
1764
- "primaryKey": false,
1765
- "notNull": false
1766
- },
1767
- "attributes": {
1768
- "name": "attributes",
1769
- "type": "jsonb",
1770
- "primaryKey": false,
1771
- "notNull": true,
1772
- "default": "'{}'::jsonb"
1773
- }
1774
- },
1775
- "indexes": {},
1776
- "foreignKeys": {
1777
- "document_type_category_id_document_category_id_fk": {
1778
- "name": "document_type_category_id_document_category_id_fk",
1779
- "tableFrom": "document_type",
1780
- "tableTo": "document_category",
1781
- "schemaTo": "document_management",
1782
- "columnsFrom": [
1783
- "category_id"
1784
- ],
1785
- "columnsTo": [
1786
- "id"
1787
- ],
1788
- "onDelete": "no action",
1789
- "onUpdate": "no action"
1790
- }
1791
- },
1792
- "compositePrimaryKeys": {},
1793
- "uniqueConstraints": {
1794
- "document_type_category_id_label_unique": {
1795
- "name": "document_type_category_id_label_unique",
1796
- "nullsNotDistinct": false,
1797
- "columns": [
1798
- "category_id",
1799
- "label"
1800
- ]
1801
- }
1802
- },
1803
- "policies": {},
1804
- "checkConstraints": {},
1805
- "isRLSEnabled": false
1806
- },
1807
- "document_management.document_type_property": {
1808
- "name": "document_type_property",
1809
- "schema": "document_management",
1810
- "columns": {
1811
- "id": {
1812
- "name": "id",
1813
- "type": "uuid",
1814
- "primaryKey": true,
1815
- "notNull": true,
1816
- "default": "gen_random_uuid()"
1817
- },
1818
- "type_id": {
1819
- "name": "type_id",
1820
- "type": "uuid",
1821
- "primaryKey": false,
1822
- "notNull": true
1823
- },
1824
- "property_id": {
1825
- "name": "property_id",
1826
- "type": "uuid",
1827
- "primaryKey": false,
1828
- "notNull": true
1829
- },
1830
- "revision": {
1831
- "name": "revision",
1832
- "type": "integer",
1833
- "primaryKey": false,
1834
- "notNull": true
1835
- },
1836
- "revision_timestamp": {
1837
- "name": "revision_timestamp",
1838
- "type": "timestamp with time zone",
1839
- "primaryKey": false,
1840
- "notNull": true
1841
- },
1842
- "create_timestamp": {
1843
- "name": "create_timestamp",
1844
- "type": "timestamp with time zone",
1845
- "primaryKey": false,
1846
- "notNull": true
1847
- },
1848
- "delete_timestamp": {
1849
- "name": "delete_timestamp",
1850
- "type": "timestamp with time zone",
1851
- "primaryKey": false,
1852
- "notNull": false
1853
- },
1854
- "attributes": {
1855
- "name": "attributes",
1856
- "type": "jsonb",
1857
- "primaryKey": false,
1858
- "notNull": true,
1859
- "default": "'{}'::jsonb"
1860
- }
1861
- },
1862
- "indexes": {},
1863
- "foreignKeys": {
1864
- "document_type_property_type_id_document_type_id_fk": {
1865
- "name": "document_type_property_type_id_document_type_id_fk",
1866
- "tableFrom": "document_type_property",
1867
- "tableTo": "document_type",
1868
- "schemaTo": "document_management",
1869
- "columnsFrom": [
1870
- "type_id"
1871
- ],
1872
- "columnsTo": [
1873
- "id"
1874
- ],
1875
- "onDelete": "no action",
1876
- "onUpdate": "no action"
1877
- },
1878
- "document_type_property_property_id_document_property_id_fk": {
1879
- "name": "document_type_property_property_id_document_property_id_fk",
1880
- "tableFrom": "document_type_property",
1881
- "tableTo": "document_property",
1882
- "schemaTo": "document_management",
1883
- "columnsFrom": [
1884
- "property_id"
1885
- ],
1886
- "columnsTo": [
1887
- "id"
1888
- ],
1889
- "onDelete": "no action",
1890
- "onUpdate": "no action"
1891
- }
1892
- },
1893
- "compositePrimaryKeys": {},
1894
- "uniqueConstraints": {
1895
- "document_type_property_type_id_property_id_unique": {
1896
- "name": "document_type_property_type_id_property_id_unique",
1897
- "nullsNotDistinct": false,
1898
- "columns": [
1899
- "type_id",
1900
- "property_id"
1901
- ]
1902
- }
1903
- },
1904
- "policies": {},
1905
- "checkConstraints": {},
1906
- "isRLSEnabled": false
1907
- }
1908
- },
1909
- "enums": {
1910
- "document_management.document_property_data_type": {
1911
- "name": "document_property_data_type",
1912
- "schema": "document_management",
1913
- "values": [
1914
- "text",
1915
- "integer",
1916
- "decimal",
1917
- "boolean",
1918
- "date"
1919
- ]
1920
- }
1921
- },
1922
- "schemas": {},
1923
- "sequences": {},
1924
- "roles": {},
1925
- "policies": {},
1926
- "views": {},
1927
- "_meta": {
1928
- "columns": {},
1929
- "schemas": {},
1930
- "tables": {}
1931
- }
1932
- }