@open-mercato/core 0.6.1-develop.3291.1.6fad645fd0 → 0.6.1

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 (122) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/AGENTS.md +14 -0
  3. package/dist/modules/auth/backend/roles/[id]/edit/page.js +2 -1
  4. package/dist/modules/auth/backend/roles/[id]/edit/page.js.map +2 -2
  5. package/dist/modules/auth/backend/users/[id]/edit/page.js +2 -5
  6. package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
  7. package/dist/modules/catalog/ai-agents.js +47 -5
  8. package/dist/modules/catalog/ai-agents.js.map +2 -2
  9. package/dist/modules/catalog/backend/catalog/categories/[id]/edit/page.js +2 -5
  10. package/dist/modules/catalog/backend/catalog/categories/[id]/edit/page.js.map +2 -2
  11. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js +4 -3
  12. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js.map +2 -2
  13. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +2 -9
  14. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  15. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js +2 -9
  16. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js.map +2 -2
  17. package/dist/modules/customers/ai-agents.js +174 -1
  18. package/dist/modules/customers/ai-agents.js.map +2 -2
  19. package/dist/modules/customers/ai-tools/deal-analyzer-pack.js +196 -0
  20. package/dist/modules/customers/ai-tools/deal-analyzer-pack.js.map +7 -0
  21. package/dist/modules/customers/ai-tools.js +3 -1
  22. package/dist/modules/customers/ai-tools.js.map +2 -2
  23. package/dist/modules/customers/backend/customers/companies/page.js +11 -1
  24. package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
  25. package/dist/modules/customers/backend/customers/deals/page.js +11 -1
  26. package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
  27. package/dist/modules/customers/backend/customers/people/page.js +11 -1
  28. package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
  29. package/dist/modules/customers/commands/companies.js +37 -15
  30. package/dist/modules/customers/commands/companies.js.map +2 -2
  31. package/dist/modules/customers/components/detail/AiActionChips.js +2 -2
  32. package/dist/modules/customers/components/detail/AiActionChips.js.map +2 -2
  33. package/dist/modules/customers/components/detail/ChangelogTab.js +3 -9
  34. package/dist/modules/customers/components/detail/ChangelogTab.js.map +2 -2
  35. package/dist/modules/customers/components/detail/changelogValues.js +35 -0
  36. package/dist/modules/customers/components/detail/changelogValues.js.map +7 -0
  37. package/dist/modules/customers/components/detail/customFieldUtils.js +1 -1
  38. package/dist/modules/customers/components/detail/customFieldUtils.js.map +1 -1
  39. package/dist/modules/customers/components/formConfig.js +3 -2
  40. package/dist/modules/customers/components/formConfig.js.map +2 -2
  41. package/dist/modules/customers/widgets/injection/ai-assistant-trigger/widget.client.js +4 -9
  42. package/dist/modules/customers/widgets/injection/ai-assistant-trigger/widget.client.js.map +2 -2
  43. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.client.js +302 -0
  44. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.client.js.map +7 -0
  45. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.js +17 -0
  46. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.js.map +7 -0
  47. package/dist/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.client.js +2 -2
  48. package/dist/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.client.js.map +2 -2
  49. package/dist/modules/customers/widgets/injection-table.js +2 -2
  50. package/dist/modules/customers/widgets/injection-table.js.map +2 -2
  51. package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js +2 -5
  52. package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js.map +2 -2
  53. package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.js +2 -5
  54. package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.js.map +2 -2
  55. package/dist/modules/resources/backend/resources/resources/[id]/page.js +2 -5
  56. package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
  57. package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js +2 -25
  58. package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js.map +2 -2
  59. package/dist/modules/sales/components/channels/ChannelOfferForm.js +2 -43
  60. package/dist/modules/sales/components/channels/ChannelOfferForm.js.map +2 -2
  61. package/dist/modules/sales/components/documents/LineItemDialog.js +162 -42
  62. package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
  63. package/dist/modules/sales/components/documents/customFieldHelpers.js +4 -31
  64. package/dist/modules/sales/components/documents/customFieldHelpers.js.map +2 -2
  65. package/package.json +16 -8
  66. package/src/modules/auth/backend/roles/[id]/edit/page.tsx +2 -1
  67. package/src/modules/auth/backend/users/[id]/edit/page.tsx +2 -5
  68. package/src/modules/business_rules/migrations/.snapshot-open-mercato.json +746 -394
  69. package/src/modules/catalog/ai-agents.ts +62 -4
  70. package/src/modules/catalog/backend/catalog/categories/[id]/edit/page.tsx +2 -5
  71. package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +4 -3
  72. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +2 -12
  73. package/src/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.tsx +2 -10
  74. package/src/modules/catalog/migrations/.snapshot-open-mercato.json +2519 -1307
  75. package/src/modules/customer_accounts/migrations/.snapshot-open-mercato.json +828 -834
  76. package/src/modules/customers/AGENTS.md +6 -1
  77. package/src/modules/customers/ai-agents.ts +213 -6
  78. package/src/modules/customers/ai-tools/deal-analyzer-pack.ts +286 -0
  79. package/src/modules/customers/ai-tools.ts +2 -0
  80. package/src/modules/customers/backend/customers/companies/page.tsx +10 -0
  81. package/src/modules/customers/backend/customers/deals/page.tsx +10 -0
  82. package/src/modules/customers/backend/customers/people/page.tsx +10 -0
  83. package/src/modules/customers/commands/companies.ts +38 -14
  84. package/src/modules/customers/components/detail/AiActionChips.tsx +2 -2
  85. package/src/modules/customers/components/detail/ChangelogTab.tsx +3 -10
  86. package/src/modules/customers/components/detail/changelogValues.ts +42 -0
  87. package/src/modules/customers/components/detail/customFieldUtils.ts +1 -1
  88. package/src/modules/customers/components/formConfig.tsx +3 -2
  89. package/src/modules/customers/i18n/de.json +7 -0
  90. package/src/modules/customers/i18n/en.json +7 -0
  91. package/src/modules/customers/i18n/es.json +7 -0
  92. package/src/modules/customers/i18n/pl.json +7 -0
  93. package/src/modules/customers/migrations/.snapshot-open-mercato.json +2313 -2336
  94. package/src/modules/customers/widgets/injection/ai-assistant-trigger/widget.client.tsx +4 -6
  95. package/src/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.client.tsx +358 -0
  96. package/src/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.ts +34 -0
  97. package/src/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.client.tsx +2 -2
  98. package/src/modules/customers/widgets/injection-table.ts +12 -9
  99. package/src/modules/data_sync/migrations/.snapshot-open-mercato.json +554 -210
  100. package/src/modules/dictionaries/migrations/.snapshot-open-mercato.json +146 -146
  101. package/src/modules/directory/backend/directory/organizations/[id]/edit/page.tsx +2 -5
  102. package/src/modules/directory/backend/directory/tenants/[id]/edit/page.tsx +2 -5
  103. package/src/modules/directory/migrations/.snapshot-open-mercato.json +273 -140
  104. package/src/modules/feature_toggles/migrations/.snapshot-open-mercato.json +242 -137
  105. package/src/modules/integrations/migrations/.snapshot-open-mercato.json +498 -195
  106. package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +158 -157
  107. package/src/modules/perspectives/migrations/.snapshot-open-mercato.json +274 -129
  108. package/src/modules/planner/migrations/.snapshot-open-mercato.json +327 -157
  109. package/src/modules/progress/AGENTS.md +72 -0
  110. package/src/modules/resources/backend/resources/resources/[id]/page.tsx +2 -5
  111. package/src/modules/resources/migrations/.snapshot-open-mercato.json +920 -470
  112. package/src/modules/sales/backend/sales/channels/[channelId]/edit/page.tsx +2 -27
  113. package/src/modules/sales/components/channels/ChannelOfferForm.tsx +2 -49
  114. package/src/modules/sales/components/documents/LineItemDialog.tsx +214 -78
  115. package/src/modules/sales/components/documents/customFieldHelpers.ts +4 -43
  116. package/src/modules/sales/i18n/de.json +3 -0
  117. package/src/modules/sales/i18n/en.json +3 -0
  118. package/src/modules/sales/i18n/es.json +3 -0
  119. package/src/modules/sales/i18n/pl.json +3 -0
  120. package/src/modules/sales/migrations/.snapshot-open-mercato.json +4740 -4778
  121. package/src/modules/shipping_carriers/migrations/.snapshot-open-mercato.json +340 -81
  122. package/src/modules/staff/migrations/.snapshot-open-mercato.json +1439 -729
@@ -1,120 +1,287 @@
1
1
  {
2
+ "name": "public",
2
3
  "namespaces": [
3
4
  "public"
4
5
  ],
5
- "name": "public",
6
6
  "tables": [
7
7
  {
8
+ "name": "resources_resource_activities",
9
+ "schema": "public",
8
10
  "columns": {
9
- "id": {
10
- "name": "id",
11
- "type": "uuid",
11
+ "activity_type": {
12
+ "name": "activity_type",
13
+ "type": "text",
12
14
  "unsigned": false,
13
15
  "autoincrement": false,
14
16
  "primary": false,
15
17
  "nullable": false,
16
- "default": "gen_random_uuid()",
17
- "mappedType": "uuid"
18
+ "unique": false,
19
+ "length": null,
20
+ "precision": null,
21
+ "scale": null,
22
+ "default": null,
23
+ "comment": null,
24
+ "enumItems": [],
25
+ "mappedType": "text"
18
26
  },
19
- "tenant_id": {
20
- "name": "tenant_id",
21
- "type": "uuid",
27
+ "appearance_color": {
28
+ "name": "appearance_color",
29
+ "type": "text",
22
30
  "unsigned": false,
23
31
  "autoincrement": false,
24
32
  "primary": false,
25
- "nullable": false,
26
- "mappedType": "uuid"
33
+ "nullable": true,
34
+ "unique": false,
35
+ "length": null,
36
+ "precision": null,
37
+ "scale": null,
38
+ "default": null,
39
+ "comment": null,
40
+ "enumItems": [],
41
+ "mappedType": "text"
27
42
  },
28
- "organization_id": {
29
- "name": "organization_id",
43
+ "appearance_icon": {
44
+ "name": "appearance_icon",
45
+ "type": "text",
46
+ "unsigned": false,
47
+ "autoincrement": false,
48
+ "primary": false,
49
+ "nullable": true,
50
+ "unique": false,
51
+ "length": null,
52
+ "precision": null,
53
+ "scale": null,
54
+ "default": null,
55
+ "comment": null,
56
+ "enumItems": [],
57
+ "mappedType": "text"
58
+ },
59
+ "author_user_id": {
60
+ "name": "author_user_id",
30
61
  "type": "uuid",
31
62
  "unsigned": false,
32
63
  "autoincrement": false,
33
64
  "primary": false,
34
- "nullable": false,
65
+ "nullable": true,
66
+ "unique": false,
67
+ "length": null,
68
+ "precision": null,
69
+ "scale": null,
70
+ "default": null,
71
+ "comment": null,
72
+ "enumItems": [],
35
73
  "mappedType": "uuid"
36
74
  },
37
- "name": {
38
- "name": "name",
75
+ "body": {
76
+ "name": "body",
39
77
  "type": "text",
40
78
  "unsigned": false,
41
79
  "autoincrement": false,
42
80
  "primary": false,
43
- "nullable": false,
81
+ "nullable": true,
82
+ "unique": false,
83
+ "length": null,
84
+ "precision": null,
85
+ "scale": null,
86
+ "default": null,
87
+ "comment": null,
88
+ "enumItems": [],
44
89
  "mappedType": "text"
45
90
  },
46
- "description": {
47
- "name": "description",
48
- "type": "text",
91
+ "created_at": {
92
+ "name": "created_at",
93
+ "type": "timestamptz(6)",
49
94
  "unsigned": false,
50
95
  "autoincrement": false,
51
96
  "primary": false,
52
- "nullable": true,
53
- "mappedType": "text"
97
+ "nullable": false,
98
+ "unique": false,
99
+ "length": 6,
100
+ "precision": null,
101
+ "scale": null,
102
+ "default": null,
103
+ "comment": null,
104
+ "enumItems": [],
105
+ "mappedType": "datetime"
54
106
  },
55
- "resource_type_id": {
56
- "name": "resource_type_id",
107
+ "id": {
108
+ "name": "id",
57
109
  "type": "uuid",
58
110
  "unsigned": false,
59
111
  "autoincrement": false,
60
- "primary": false,
61
- "nullable": true,
112
+ "primary": true,
113
+ "nullable": false,
114
+ "unique": false,
115
+ "length": null,
116
+ "precision": null,
117
+ "scale": null,
118
+ "default": "gen_random_uuid()",
119
+ "comment": null,
120
+ "enumItems": [],
62
121
  "mappedType": "uuid"
63
122
  },
64
- "capacity": {
65
- "name": "capacity",
66
- "type": "int",
123
+ "occurred_at": {
124
+ "name": "occurred_at",
125
+ "type": "timestamptz(6)",
67
126
  "unsigned": false,
68
127
  "autoincrement": false,
69
128
  "primary": false,
70
129
  "nullable": true,
71
- "mappedType": "integer"
130
+ "unique": false,
131
+ "length": 6,
132
+ "precision": null,
133
+ "scale": null,
134
+ "default": null,
135
+ "comment": null,
136
+ "enumItems": [],
137
+ "mappedType": "datetime"
72
138
  },
73
- "capacity_unit_value": {
74
- "name": "capacity_unit_value",
75
- "type": "text",
139
+ "organization_id": {
140
+ "name": "organization_id",
141
+ "type": "uuid",
76
142
  "unsigned": false,
77
143
  "autoincrement": false,
78
144
  "primary": false,
79
- "nullable": true,
80
- "mappedType": "text"
145
+ "nullable": false,
146
+ "unique": false,
147
+ "length": null,
148
+ "precision": null,
149
+ "scale": null,
150
+ "default": null,
151
+ "comment": null,
152
+ "enumItems": [],
153
+ "mappedType": "uuid"
81
154
  },
82
- "capacity_unit_name": {
83
- "name": "capacity_unit_name",
84
- "type": "text",
155
+ "resource_id": {
156
+ "name": "resource_id",
157
+ "type": "uuid",
85
158
  "unsigned": false,
86
159
  "autoincrement": false,
87
160
  "primary": false,
88
- "nullable": true,
89
- "mappedType": "text"
161
+ "nullable": false,
162
+ "unique": false,
163
+ "length": null,
164
+ "precision": null,
165
+ "scale": null,
166
+ "default": null,
167
+ "comment": null,
168
+ "enumItems": [],
169
+ "mappedType": "uuid"
90
170
  },
91
- "capacity_unit_color": {
92
- "name": "capacity_unit_color",
171
+ "subject": {
172
+ "name": "subject",
93
173
  "type": "text",
94
174
  "unsigned": false,
95
175
  "autoincrement": false,
96
176
  "primary": false,
97
177
  "nullable": true,
178
+ "unique": false,
179
+ "length": null,
180
+ "precision": null,
181
+ "scale": null,
182
+ "default": null,
183
+ "comment": null,
184
+ "enumItems": [],
98
185
  "mappedType": "text"
99
186
  },
100
- "capacity_unit_icon": {
101
- "name": "capacity_unit_icon",
102
- "type": "text",
187
+ "tenant_id": {
188
+ "name": "tenant_id",
189
+ "type": "uuid",
103
190
  "unsigned": false,
104
191
  "autoincrement": false,
105
192
  "primary": false,
106
- "nullable": true,
107
- "mappedType": "text"
193
+ "nullable": false,
194
+ "unique": false,
195
+ "length": null,
196
+ "precision": null,
197
+ "scale": null,
198
+ "default": null,
199
+ "comment": null,
200
+ "enumItems": [],
201
+ "mappedType": "uuid"
108
202
  },
109
- "appearance_icon": {
110
- "name": "appearance_icon",
111
- "type": "text",
203
+ "updated_at": {
204
+ "name": "updated_at",
205
+ "type": "timestamptz(6)",
112
206
  "unsigned": false,
113
207
  "autoincrement": false,
114
208
  "primary": false,
115
- "nullable": true,
116
- "mappedType": "text"
209
+ "nullable": false,
210
+ "unique": false,
211
+ "length": 6,
212
+ "precision": null,
213
+ "scale": null,
214
+ "default": null,
215
+ "comment": null,
216
+ "enumItems": [],
217
+ "mappedType": "datetime"
218
+ }
219
+ },
220
+ "indexes": [
221
+ {
222
+ "columnNames": [
223
+ "id"
224
+ ],
225
+ "composite": false,
226
+ "constraint": true,
227
+ "keyName": "resources_resource_activities_pkey",
228
+ "primary": true,
229
+ "unique": true
230
+ },
231
+ {
232
+ "columnNames": [
233
+ "resource_id"
234
+ ],
235
+ "composite": false,
236
+ "constraint": false,
237
+ "keyName": "resources_resource_activities_resource_idx",
238
+ "primary": false,
239
+ "unique": false
240
+ },
241
+ {
242
+ "columnNames": [
243
+ "resource_id",
244
+ "occurred_at",
245
+ "created_at"
246
+ ],
247
+ "composite": true,
248
+ "constraint": false,
249
+ "keyName": "resources_resource_activities_resource_occurred_created_idx",
250
+ "primary": false,
251
+ "unique": false
117
252
  },
253
+ {
254
+ "columnNames": [
255
+ "tenant_id",
256
+ "organization_id"
257
+ ],
258
+ "composite": true,
259
+ "constraint": false,
260
+ "keyName": "resources_resource_activities_tenant_org_idx",
261
+ "primary": false,
262
+ "unique": false
263
+ }
264
+ ],
265
+ "checks": [],
266
+ "foreignKeys": {
267
+ "resources_resource_activities_resource_id_foreign": {
268
+ "columnNames": [
269
+ "resource_id"
270
+ ],
271
+ "constraintName": "resources_resource_activities_resource_id_foreign",
272
+ "localTableName": "public.resources_resource_activities",
273
+ "referencedColumnNames": [
274
+ "id"
275
+ ],
276
+ "referencedTableName": "public.resources_resources"
277
+ }
278
+ },
279
+ "comment": null
280
+ },
281
+ {
282
+ "name": "resources_resource_comments",
283
+ "schema": "public",
284
+ "columns": {
118
285
  "appearance_color": {
119
286
  "name": "appearance_color",
120
287
  "type": "text",
@@ -122,294 +289,259 @@
122
289
  "autoincrement": false,
123
290
  "primary": false,
124
291
  "nullable": true,
292
+ "unique": false,
293
+ "length": null,
294
+ "precision": null,
295
+ "scale": null,
296
+ "default": null,
297
+ "comment": null,
298
+ "enumItems": [],
125
299
  "mappedType": "text"
126
300
  },
127
- "is_active": {
128
- "name": "is_active",
129
- "type": "boolean",
301
+ "appearance_icon": {
302
+ "name": "appearance_icon",
303
+ "type": "text",
130
304
  "unsigned": false,
131
305
  "autoincrement": false,
132
306
  "primary": false,
133
- "nullable": false,
134
- "default": "true",
135
- "mappedType": "boolean"
307
+ "nullable": true,
308
+ "unique": false,
309
+ "length": null,
310
+ "precision": null,
311
+ "scale": null,
312
+ "default": null,
313
+ "comment": null,
314
+ "enumItems": [],
315
+ "mappedType": "text"
136
316
  },
137
- "availability_rule_set_id": {
138
- "name": "availability_rule_set_id",
317
+ "author_user_id": {
318
+ "name": "author_user_id",
139
319
  "type": "uuid",
140
320
  "unsigned": false,
141
321
  "autoincrement": false,
142
322
  "primary": false,
143
323
  "nullable": true,
324
+ "unique": false,
325
+ "length": null,
326
+ "precision": null,
327
+ "scale": null,
328
+ "default": null,
329
+ "comment": null,
330
+ "enumItems": [],
144
331
  "mappedType": "uuid"
145
332
  },
146
- "created_at": {
147
- "name": "created_at",
148
- "type": "timestamptz",
333
+ "body": {
334
+ "name": "body",
335
+ "type": "text",
149
336
  "unsigned": false,
150
337
  "autoincrement": false,
151
338
  "primary": false,
152
339
  "nullable": false,
153
- "length": 6,
154
- "mappedType": "datetime"
340
+ "unique": false,
341
+ "length": null,
342
+ "precision": null,
343
+ "scale": null,
344
+ "default": null,
345
+ "comment": null,
346
+ "enumItems": [],
347
+ "mappedType": "text"
155
348
  },
156
- "updated_at": {
157
- "name": "updated_at",
158
- "type": "timestamptz",
349
+ "created_at": {
350
+ "name": "created_at",
351
+ "type": "timestamptz(6)",
159
352
  "unsigned": false,
160
353
  "autoincrement": false,
161
354
  "primary": false,
162
355
  "nullable": false,
356
+ "unique": false,
163
357
  "length": 6,
358
+ "precision": null,
359
+ "scale": null,
360
+ "default": null,
361
+ "comment": null,
362
+ "enumItems": [],
164
363
  "mappedType": "datetime"
165
364
  },
166
365
  "deleted_at": {
167
366
  "name": "deleted_at",
168
- "type": "timestamptz",
367
+ "type": "timestamptz(6)",
169
368
  "unsigned": false,
170
369
  "autoincrement": false,
171
370
  "primary": false,
172
371
  "nullable": true,
372
+ "unique": false,
173
373
  "length": 6,
374
+ "precision": null,
375
+ "scale": null,
376
+ "default": null,
377
+ "comment": null,
378
+ "enumItems": [],
174
379
  "mappedType": "datetime"
175
- }
176
- },
177
- "name": "resources_resources",
178
- "schema": "public",
179
- "indexes": [
180
- {
181
- "keyName": "resources_resources_tenant_org_idx",
182
- "columnNames": [
183
- "tenant_id",
184
- "organization_id"
185
- ],
186
- "composite": true,
187
- "constraint": false,
188
- "primary": false,
189
- "unique": false
190
380
  },
191
- {
192
- "keyName": "resources_resources_pkey",
193
- "columnNames": [
194
- "id"
195
- ],
196
- "composite": false,
197
- "constraint": true,
198
- "primary": true,
199
- "unique": true
200
- }
201
- ],
202
- "checks": [],
203
- "foreignKeys": {},
204
- "nativeEnums": {}
205
- },
206
- {
207
- "columns": {
208
381
  "id": {
209
382
  "name": "id",
210
383
  "type": "uuid",
211
384
  "unsigned": false,
212
385
  "autoincrement": false,
213
- "primary": false,
386
+ "primary": true,
214
387
  "nullable": false,
388
+ "unique": false,
389
+ "length": null,
390
+ "precision": null,
391
+ "scale": null,
215
392
  "default": "gen_random_uuid()",
393
+ "comment": null,
394
+ "enumItems": [],
216
395
  "mappedType": "uuid"
217
396
  },
218
- "tenant_id": {
219
- "name": "tenant_id",
397
+ "organization_id": {
398
+ "name": "organization_id",
220
399
  "type": "uuid",
221
400
  "unsigned": false,
222
401
  "autoincrement": false,
223
402
  "primary": false,
224
403
  "nullable": false,
404
+ "unique": false,
405
+ "length": null,
406
+ "precision": null,
407
+ "scale": null,
408
+ "default": null,
409
+ "comment": null,
410
+ "enumItems": [],
225
411
  "mappedType": "uuid"
226
412
  },
227
- "organization_id": {
228
- "name": "organization_id",
413
+ "resource_id": {
414
+ "name": "resource_id",
229
415
  "type": "uuid",
230
416
  "unsigned": false,
231
417
  "autoincrement": false,
232
418
  "primary": false,
233
419
  "nullable": false,
420
+ "unique": false,
421
+ "length": null,
422
+ "precision": null,
423
+ "scale": null,
424
+ "default": null,
425
+ "comment": null,
426
+ "enumItems": [],
234
427
  "mappedType": "uuid"
235
428
  },
236
- "activity_type": {
237
- "name": "activity_type",
238
- "type": "text",
429
+ "tenant_id": {
430
+ "name": "tenant_id",
431
+ "type": "uuid",
239
432
  "unsigned": false,
240
433
  "autoincrement": false,
241
434
  "primary": false,
242
435
  "nullable": false,
243
- "mappedType": "text"
244
- },
245
- "subject": {
246
- "name": "subject",
247
- "type": "text",
248
- "unsigned": false,
249
- "autoincrement": false,
250
- "primary": false,
251
- "nullable": true,
252
- "mappedType": "text"
253
- },
254
- "body": {
255
- "name": "body",
256
- "type": "text",
257
- "unsigned": false,
258
- "autoincrement": false,
259
- "primary": false,
260
- "nullable": true,
261
- "mappedType": "text"
262
- },
263
- "occurred_at": {
264
- "name": "occurred_at",
265
- "type": "timestamptz",
266
- "unsigned": false,
267
- "autoincrement": false,
268
- "primary": false,
269
- "nullable": true,
270
- "length": 6,
271
- "mappedType": "datetime"
272
- },
273
- "author_user_id": {
274
- "name": "author_user_id",
275
- "type": "uuid",
276
- "unsigned": false,
277
- "autoincrement": false,
278
- "primary": false,
279
- "nullable": true,
280
- "mappedType": "uuid"
281
- },
282
- "appearance_icon": {
283
- "name": "appearance_icon",
284
- "type": "text",
285
- "unsigned": false,
286
- "autoincrement": false,
287
- "primary": false,
288
- "nullable": true,
289
- "mappedType": "text"
290
- },
291
- "appearance_color": {
292
- "name": "appearance_color",
293
- "type": "text",
294
- "unsigned": false,
295
- "autoincrement": false,
296
- "primary": false,
297
- "nullable": true,
298
- "mappedType": "text"
299
- },
300
- "created_at": {
301
- "name": "created_at",
302
- "type": "timestamptz",
303
- "unsigned": false,
304
- "autoincrement": false,
305
- "primary": false,
306
- "nullable": false,
307
- "length": 6,
308
- "mappedType": "datetime"
436
+ "unique": false,
437
+ "length": null,
438
+ "precision": null,
439
+ "scale": null,
440
+ "default": null,
441
+ "comment": null,
442
+ "enumItems": [],
443
+ "mappedType": "uuid"
309
444
  },
310
445
  "updated_at": {
311
446
  "name": "updated_at",
312
- "type": "timestamptz",
447
+ "type": "timestamptz(6)",
313
448
  "unsigned": false,
314
449
  "autoincrement": false,
315
450
  "primary": false,
316
451
  "nullable": false,
452
+ "unique": false,
317
453
  "length": 6,
454
+ "precision": null,
455
+ "scale": null,
456
+ "default": null,
457
+ "comment": null,
458
+ "enumItems": [],
318
459
  "mappedType": "datetime"
319
- },
320
- "resource_id": {
321
- "name": "resource_id",
322
- "type": "uuid",
323
- "unsigned": false,
324
- "autoincrement": false,
325
- "primary": false,
326
- "nullable": false,
327
- "mappedType": "uuid"
328
460
  }
329
461
  },
330
- "name": "resources_resource_activities",
331
- "schema": "public",
332
462
  "indexes": [
333
463
  {
334
- "keyName": "resources_resource_activities_resource_occurred_created_idx",
335
464
  "columnNames": [
336
- "resource_id",
337
- "occurred_at",
338
- "created_at"
465
+ "id"
339
466
  ],
340
- "composite": true,
341
- "constraint": false,
342
- "primary": false,
343
- "unique": false
467
+ "composite": false,
468
+ "constraint": true,
469
+ "keyName": "resources_resource_comments_pkey",
470
+ "primary": true,
471
+ "unique": true
344
472
  },
345
473
  {
346
- "keyName": "resources_resource_activities_tenant_org_idx",
347
474
  "columnNames": [
348
- "tenant_id",
349
- "organization_id"
475
+ "resource_id"
350
476
  ],
351
- "composite": true,
477
+ "composite": false,
352
478
  "constraint": false,
479
+ "keyName": "resources_resource_comments_resource_idx",
353
480
  "primary": false,
354
481
  "unique": false
355
482
  },
356
483
  {
357
- "keyName": "resources_resource_activities_resource_idx",
358
484
  "columnNames": [
359
- "resource_id"
485
+ "tenant_id",
486
+ "organization_id"
360
487
  ],
361
- "composite": false,
488
+ "composite": true,
362
489
  "constraint": false,
490
+ "keyName": "resources_resource_comments_tenant_org_idx",
363
491
  "primary": false,
364
492
  "unique": false
365
- },
366
- {
367
- "keyName": "resources_resource_activities_pkey",
368
- "columnNames": [
369
- "id"
370
- ],
371
- "composite": false,
372
- "constraint": true,
373
- "primary": true,
374
- "unique": true
375
493
  }
376
494
  ],
377
495
  "checks": [],
378
496
  "foreignKeys": {
379
- "resources_resource_activities_resource_id_foreign": {
380
- "constraintName": "resources_resource_activities_resource_id_foreign",
497
+ "resources_resource_comments_resource_id_foreign": {
381
498
  "columnNames": [
382
499
  "resource_id"
383
500
  ],
384
- "localTableName": "public.resources_resource_activities",
501
+ "constraintName": "resources_resource_comments_resource_id_foreign",
502
+ "localTableName": "public.resources_resource_comments",
385
503
  "referencedColumnNames": [
386
504
  "id"
387
505
  ],
388
- "referencedTableName": "public.resources_resources",
389
- "updateRule": "cascade"
506
+ "referencedTableName": "public.resources_resources"
390
507
  }
391
508
  },
392
- "nativeEnums": {}
509
+ "comment": null
393
510
  },
394
511
  {
512
+ "name": "resources_resource_tag_assignments",
513
+ "schema": "public",
395
514
  "columns": {
396
- "id": {
397
- "name": "id",
398
- "type": "uuid",
515
+ "created_at": {
516
+ "name": "created_at",
517
+ "type": "timestamptz(6)",
399
518
  "unsigned": false,
400
519
  "autoincrement": false,
401
520
  "primary": false,
402
521
  "nullable": false,
403
- "default": "gen_random_uuid()",
404
- "mappedType": "uuid"
522
+ "unique": false,
523
+ "length": 6,
524
+ "precision": null,
525
+ "scale": null,
526
+ "default": null,
527
+ "comment": null,
528
+ "enumItems": [],
529
+ "mappedType": "datetime"
405
530
  },
406
- "tenant_id": {
407
- "name": "tenant_id",
531
+ "id": {
532
+ "name": "id",
408
533
  "type": "uuid",
409
534
  "unsigned": false,
410
535
  "autoincrement": false,
411
- "primary": false,
536
+ "primary": true,
412
537
  "nullable": false,
538
+ "unique": false,
539
+ "length": null,
540
+ "precision": null,
541
+ "scale": null,
542
+ "default": "gen_random_uuid()",
543
+ "comment": null,
544
+ "enumItems": [],
413
545
  "mappedType": "uuid"
414
546
  },
415
547
  "organization_id": {
@@ -419,174 +551,208 @@
419
551
  "autoincrement": false,
420
552
  "primary": false,
421
553
  "nullable": false,
554
+ "unique": false,
555
+ "length": null,
556
+ "precision": null,
557
+ "scale": null,
558
+ "default": null,
559
+ "comment": null,
560
+ "enumItems": [],
422
561
  "mappedType": "uuid"
423
562
  },
424
- "body": {
425
- "name": "body",
426
- "type": "text",
563
+ "resource_id": {
564
+ "name": "resource_id",
565
+ "type": "uuid",
427
566
  "unsigned": false,
428
567
  "autoincrement": false,
429
568
  "primary": false,
430
569
  "nullable": false,
431
- "mappedType": "text"
570
+ "unique": false,
571
+ "length": null,
572
+ "precision": null,
573
+ "scale": null,
574
+ "default": null,
575
+ "comment": null,
576
+ "enumItems": [],
577
+ "mappedType": "uuid"
432
578
  },
433
- "author_user_id": {
434
- "name": "author_user_id",
579
+ "tag_id": {
580
+ "name": "tag_id",
435
581
  "type": "uuid",
436
582
  "unsigned": false,
437
583
  "autoincrement": false,
438
584
  "primary": false,
439
- "nullable": true,
585
+ "nullable": false,
586
+ "unique": true,
587
+ "length": null,
588
+ "precision": null,
589
+ "scale": null,
590
+ "default": null,
591
+ "comment": null,
592
+ "enumItems": [],
440
593
  "mappedType": "uuid"
441
594
  },
442
- "appearance_icon": {
443
- "name": "appearance_icon",
444
- "type": "text",
445
- "unsigned": false,
446
- "autoincrement": false,
447
- "primary": false,
448
- "nullable": true,
449
- "mappedType": "text"
450
- },
451
- "appearance_color": {
452
- "name": "appearance_color",
453
- "type": "text",
454
- "unsigned": false,
455
- "autoincrement": false,
456
- "primary": false,
457
- "nullable": true,
458
- "mappedType": "text"
459
- },
460
- "created_at": {
461
- "name": "created_at",
462
- "type": "timestamptz",
595
+ "tenant_id": {
596
+ "name": "tenant_id",
597
+ "type": "uuid",
463
598
  "unsigned": false,
464
599
  "autoincrement": false,
465
600
  "primary": false,
466
601
  "nullable": false,
467
- "length": 6,
468
- "mappedType": "datetime"
602
+ "unique": false,
603
+ "length": null,
604
+ "precision": null,
605
+ "scale": null,
606
+ "default": null,
607
+ "comment": null,
608
+ "enumItems": [],
609
+ "mappedType": "uuid"
469
610
  },
470
611
  "updated_at": {
471
612
  "name": "updated_at",
472
- "type": "timestamptz",
613
+ "type": "timestamptz(6)",
473
614
  "unsigned": false,
474
615
  "autoincrement": false,
475
616
  "primary": false,
476
617
  "nullable": false,
618
+ "unique": false,
477
619
  "length": 6,
620
+ "precision": null,
621
+ "scale": null,
622
+ "default": null,
623
+ "comment": null,
624
+ "enumItems": [],
478
625
  "mappedType": "datetime"
479
- },
480
- "deleted_at": {
481
- "name": "deleted_at",
482
- "type": "timestamptz",
483
- "unsigned": false,
484
- "autoincrement": false,
485
- "primary": false,
486
- "nullable": true,
487
- "length": 6,
488
- "mappedType": "datetime"
489
- },
490
- "resource_id": {
491
- "name": "resource_id",
492
- "type": "uuid",
493
- "unsigned": false,
494
- "autoincrement": false,
495
- "primary": false,
496
- "nullable": false,
497
- "mappedType": "uuid"
498
626
  }
499
627
  },
500
- "name": "resources_resource_comments",
501
- "schema": "public",
502
628
  "indexes": [
503
629
  {
504
- "keyName": "resources_resource_comments_tenant_org_idx",
505
630
  "columnNames": [
506
- "tenant_id",
507
- "organization_id"
631
+ "id"
508
632
  ],
509
- "composite": true,
510
- "constraint": false,
511
- "primary": false,
512
- "unique": false
633
+ "composite": false,
634
+ "constraint": true,
635
+ "keyName": "resources_resource_tag_assignments_pkey",
636
+ "primary": true,
637
+ "unique": true
513
638
  },
514
639
  {
515
- "keyName": "resources_resource_comments_resource_idx",
516
640
  "columnNames": [
517
- "resource_id"
641
+ "organization_id",
642
+ "tenant_id"
518
643
  ],
519
- "composite": false,
644
+ "composite": true,
520
645
  "constraint": false,
646
+ "keyName": "resources_resource_tag_assignments_scope_idx",
521
647
  "primary": false,
522
648
  "unique": false
523
649
  },
524
650
  {
525
- "keyName": "resources_resource_comments_pkey",
526
651
  "columnNames": [
527
- "id"
652
+ "tag_id",
653
+ "resource_id"
528
654
  ],
529
- "composite": false,
655
+ "composite": true,
530
656
  "constraint": true,
531
- "primary": true,
657
+ "keyName": "resources_resource_tag_assignments_unique",
658
+ "primary": false,
532
659
  "unique": true
533
660
  }
534
661
  ],
535
662
  "checks": [],
536
663
  "foreignKeys": {
537
- "resources_resource_comments_resource_id_foreign": {
538
- "constraintName": "resources_resource_comments_resource_id_foreign",
664
+ "resources_resource_tag_assignments_resource_id_foreign": {
539
665
  "columnNames": [
540
666
  "resource_id"
541
667
  ],
542
- "localTableName": "public.resources_resource_comments",
668
+ "constraintName": "resources_resource_tag_assignments_resource_id_foreign",
669
+ "localTableName": "public.resources_resource_tag_assignments",
670
+ "referencedColumnNames": [
671
+ "id"
672
+ ],
673
+ "referencedTableName": "public.resources_resources"
674
+ },
675
+ "resources_resource_tag_assignments_tag_id_foreign": {
676
+ "columnNames": [
677
+ "tag_id"
678
+ ],
679
+ "constraintName": "resources_resource_tag_assignments_tag_id_foreign",
680
+ "localTableName": "public.resources_resource_tag_assignments",
543
681
  "referencedColumnNames": [
544
682
  "id"
545
683
  ],
546
- "referencedTableName": "public.resources_resources",
547
- "updateRule": "cascade"
684
+ "referencedTableName": "public.resources_resource_tags"
548
685
  }
549
686
  },
550
- "nativeEnums": {}
687
+ "comment": null
551
688
  },
552
689
  {
690
+ "name": "resources_resource_tags",
691
+ "schema": "public",
553
692
  "columns": {
554
- "id": {
555
- "name": "id",
556
- "type": "uuid",
693
+ "color": {
694
+ "name": "color",
695
+ "type": "text",
557
696
  "unsigned": false,
558
697
  "autoincrement": false,
559
698
  "primary": false,
560
- "nullable": false,
561
- "default": "gen_random_uuid()",
562
- "mappedType": "uuid"
699
+ "nullable": true,
700
+ "unique": false,
701
+ "length": null,
702
+ "precision": null,
703
+ "scale": null,
704
+ "default": null,
705
+ "comment": null,
706
+ "enumItems": [],
707
+ "mappedType": "text"
563
708
  },
564
- "organization_id": {
565
- "name": "organization_id",
566
- "type": "uuid",
709
+ "created_at": {
710
+ "name": "created_at",
711
+ "type": "timestamptz(6)",
567
712
  "unsigned": false,
568
713
  "autoincrement": false,
569
714
  "primary": false,
570
715
  "nullable": false,
571
- "mappedType": "uuid"
716
+ "unique": false,
717
+ "length": 6,
718
+ "precision": null,
719
+ "scale": null,
720
+ "default": null,
721
+ "comment": null,
722
+ "enumItems": [],
723
+ "mappedType": "datetime"
572
724
  },
573
- "tenant_id": {
574
- "name": "tenant_id",
575
- "type": "uuid",
725
+ "description": {
726
+ "name": "description",
727
+ "type": "text",
576
728
  "unsigned": false,
577
729
  "autoincrement": false,
578
730
  "primary": false,
579
- "nullable": false,
580
- "mappedType": "uuid"
731
+ "nullable": true,
732
+ "unique": false,
733
+ "length": null,
734
+ "precision": null,
735
+ "scale": null,
736
+ "default": null,
737
+ "comment": null,
738
+ "enumItems": [],
739
+ "mappedType": "text"
581
740
  },
582
- "slug": {
583
- "name": "slug",
584
- "type": "text",
741
+ "id": {
742
+ "name": "id",
743
+ "type": "uuid",
585
744
  "unsigned": false,
586
745
  "autoincrement": false,
587
- "primary": false,
746
+ "primary": true,
588
747
  "nullable": false,
589
- "mappedType": "text"
748
+ "unique": false,
749
+ "length": null,
750
+ "precision": null,
751
+ "scale": null,
752
+ "default": "gen_random_uuid()",
753
+ "comment": null,
754
+ "enumItems": [],
755
+ "mappedType": "uuid"
590
756
  },
591
757
  "label": {
592
758
  "name": "label",
@@ -595,63 +761,103 @@
595
761
  "autoincrement": false,
596
762
  "primary": false,
597
763
  "nullable": false,
764
+ "unique": false,
765
+ "length": null,
766
+ "precision": null,
767
+ "scale": null,
768
+ "default": null,
769
+ "comment": null,
770
+ "enumItems": [],
598
771
  "mappedType": "text"
599
772
  },
600
- "color": {
601
- "name": "color",
602
- "type": "text",
773
+ "organization_id": {
774
+ "name": "organization_id",
775
+ "type": "uuid",
603
776
  "unsigned": false,
604
777
  "autoincrement": false,
605
778
  "primary": false,
606
- "nullable": true,
607
- "mappedType": "text"
779
+ "nullable": false,
780
+ "unique": true,
781
+ "length": null,
782
+ "precision": null,
783
+ "scale": null,
784
+ "default": null,
785
+ "comment": null,
786
+ "enumItems": [],
787
+ "mappedType": "uuid"
608
788
  },
609
- "description": {
610
- "name": "description",
789
+ "slug": {
790
+ "name": "slug",
611
791
  "type": "text",
612
792
  "unsigned": false,
613
793
  "autoincrement": false,
614
794
  "primary": false,
615
- "nullable": true,
795
+ "nullable": false,
796
+ "unique": false,
797
+ "length": null,
798
+ "precision": null,
799
+ "scale": null,
800
+ "default": null,
801
+ "comment": null,
802
+ "enumItems": [],
616
803
  "mappedType": "text"
617
804
  },
618
- "created_at": {
619
- "name": "created_at",
620
- "type": "timestamptz",
805
+ "tenant_id": {
806
+ "name": "tenant_id",
807
+ "type": "uuid",
621
808
  "unsigned": false,
622
809
  "autoincrement": false,
623
810
  "primary": false,
624
811
  "nullable": false,
625
- "length": 6,
626
- "mappedType": "datetime"
812
+ "unique": false,
813
+ "length": null,
814
+ "precision": null,
815
+ "scale": null,
816
+ "default": null,
817
+ "comment": null,
818
+ "enumItems": [],
819
+ "mappedType": "uuid"
627
820
  },
628
821
  "updated_at": {
629
822
  "name": "updated_at",
630
- "type": "timestamptz",
823
+ "type": "timestamptz(6)",
631
824
  "unsigned": false,
632
825
  "autoincrement": false,
633
826
  "primary": false,
634
827
  "nullable": false,
828
+ "unique": false,
635
829
  "length": 6,
830
+ "precision": null,
831
+ "scale": null,
832
+ "default": null,
833
+ "comment": null,
834
+ "enumItems": [],
636
835
  "mappedType": "datetime"
637
836
  }
638
837
  },
639
- "name": "resources_resource_tags",
640
- "schema": "public",
641
838
  "indexes": [
642
839
  {
643
- "keyName": "resources_resource_tags_scope_idx",
840
+ "columnNames": [
841
+ "id"
842
+ ],
843
+ "composite": false,
844
+ "constraint": true,
845
+ "keyName": "resources_resource_tags_pkey",
846
+ "primary": true,
847
+ "unique": true
848
+ },
849
+ {
644
850
  "columnNames": [
645
851
  "organization_id",
646
852
  "tenant_id"
647
853
  ],
648
854
  "composite": true,
649
855
  "constraint": false,
856
+ "keyName": "resources_resource_tags_scope_idx",
650
857
  "primary": false,
651
858
  "unique": false
652
859
  },
653
860
  {
654
- "keyName": "resources_resource_tags_slug_unique",
655
861
  "columnNames": [
656
862
  "organization_id",
657
863
  "tenant_id",
@@ -659,284 +865,528 @@
659
865
  ],
660
866
  "composite": true,
661
867
  "constraint": true,
868
+ "keyName": "resources_resource_tags_slug_unique",
662
869
  "primary": false,
663
870
  "unique": true
664
- },
665
- {
666
- "keyName": "resources_resource_tags_pkey",
667
- "columnNames": [
668
- "id"
669
- ],
670
- "composite": false,
671
- "constraint": true,
672
- "primary": true,
673
- "unique": true
674
871
  }
675
872
  ],
676
873
  "checks": [],
677
874
  "foreignKeys": {},
678
- "nativeEnums": {}
875
+ "comment": null
679
876
  },
680
877
  {
878
+ "name": "resources_resource_types",
879
+ "schema": "public",
681
880
  "columns": {
682
- "id": {
683
- "name": "id",
684
- "type": "uuid",
881
+ "appearance_color": {
882
+ "name": "appearance_color",
883
+ "type": "text",
884
+ "unsigned": false,
885
+ "autoincrement": false,
886
+ "primary": false,
887
+ "nullable": true,
888
+ "unique": false,
889
+ "length": null,
890
+ "precision": null,
891
+ "scale": null,
892
+ "default": null,
893
+ "comment": null,
894
+ "enumItems": [],
895
+ "mappedType": "text"
896
+ },
897
+ "appearance_icon": {
898
+ "name": "appearance_icon",
899
+ "type": "text",
900
+ "unsigned": false,
901
+ "autoincrement": false,
902
+ "primary": false,
903
+ "nullable": true,
904
+ "unique": false,
905
+ "length": null,
906
+ "precision": null,
907
+ "scale": null,
908
+ "default": null,
909
+ "comment": null,
910
+ "enumItems": [],
911
+ "mappedType": "text"
912
+ },
913
+ "created_at": {
914
+ "name": "created_at",
915
+ "type": "timestamptz(6)",
916
+ "unsigned": false,
917
+ "autoincrement": false,
918
+ "primary": false,
919
+ "nullable": false,
920
+ "unique": false,
921
+ "length": 6,
922
+ "precision": null,
923
+ "scale": null,
924
+ "default": null,
925
+ "comment": null,
926
+ "enumItems": [],
927
+ "mappedType": "datetime"
928
+ },
929
+ "deleted_at": {
930
+ "name": "deleted_at",
931
+ "type": "timestamptz(6)",
685
932
  "unsigned": false,
686
933
  "autoincrement": false,
687
934
  "primary": false,
688
- "nullable": false,
689
- "default": "gen_random_uuid()",
690
- "mappedType": "uuid"
935
+ "nullable": true,
936
+ "unique": false,
937
+ "length": 6,
938
+ "precision": null,
939
+ "scale": null,
940
+ "default": null,
941
+ "comment": null,
942
+ "enumItems": [],
943
+ "mappedType": "datetime"
691
944
  },
692
- "organization_id": {
693
- "name": "organization_id",
694
- "type": "uuid",
945
+ "description": {
946
+ "name": "description",
947
+ "type": "text",
695
948
  "unsigned": false,
696
949
  "autoincrement": false,
697
950
  "primary": false,
698
- "nullable": false,
699
- "mappedType": "uuid"
951
+ "nullable": true,
952
+ "unique": false,
953
+ "length": null,
954
+ "precision": null,
955
+ "scale": null,
956
+ "default": null,
957
+ "comment": null,
958
+ "enumItems": [],
959
+ "mappedType": "text"
700
960
  },
701
- "tenant_id": {
702
- "name": "tenant_id",
961
+ "id": {
962
+ "name": "id",
703
963
  "type": "uuid",
704
964
  "unsigned": false,
705
965
  "autoincrement": false,
706
- "primary": false,
966
+ "primary": true,
707
967
  "nullable": false,
968
+ "unique": false,
969
+ "length": null,
970
+ "precision": null,
971
+ "scale": null,
972
+ "default": "gen_random_uuid()",
973
+ "comment": null,
974
+ "enumItems": [],
708
975
  "mappedType": "uuid"
709
976
  },
710
- "tag_id": {
711
- "name": "tag_id",
712
- "type": "uuid",
977
+ "name": {
978
+ "name": "name",
979
+ "type": "text",
713
980
  "unsigned": false,
714
981
  "autoincrement": false,
715
982
  "primary": false,
716
983
  "nullable": false,
717
- "mappedType": "uuid"
984
+ "unique": false,
985
+ "length": null,
986
+ "precision": null,
987
+ "scale": null,
988
+ "default": null,
989
+ "comment": null,
990
+ "enumItems": [],
991
+ "mappedType": "text"
718
992
  },
719
- "resource_id": {
720
- "name": "resource_id",
993
+ "organization_id": {
994
+ "name": "organization_id",
721
995
  "type": "uuid",
722
996
  "unsigned": false,
723
997
  "autoincrement": false,
724
998
  "primary": false,
725
999
  "nullable": false,
1000
+ "unique": false,
1001
+ "length": null,
1002
+ "precision": null,
1003
+ "scale": null,
1004
+ "default": null,
1005
+ "comment": null,
1006
+ "enumItems": [],
726
1007
  "mappedType": "uuid"
727
1008
  },
728
- "created_at": {
729
- "name": "created_at",
730
- "type": "timestamptz",
1009
+ "tenant_id": {
1010
+ "name": "tenant_id",
1011
+ "type": "uuid",
731
1012
  "unsigned": false,
732
1013
  "autoincrement": false,
733
1014
  "primary": false,
734
1015
  "nullable": false,
735
- "length": 6,
736
- "mappedType": "datetime"
1016
+ "unique": false,
1017
+ "length": null,
1018
+ "precision": null,
1019
+ "scale": null,
1020
+ "default": null,
1021
+ "comment": null,
1022
+ "enumItems": [],
1023
+ "mappedType": "uuid"
737
1024
  },
738
1025
  "updated_at": {
739
1026
  "name": "updated_at",
740
- "type": "timestamptz",
1027
+ "type": "timestamptz(6)",
741
1028
  "unsigned": false,
742
1029
  "autoincrement": false,
743
1030
  "primary": false,
744
1031
  "nullable": false,
1032
+ "unique": false,
745
1033
  "length": 6,
1034
+ "precision": null,
1035
+ "scale": null,
1036
+ "default": null,
1037
+ "comment": null,
1038
+ "enumItems": [],
746
1039
  "mappedType": "datetime"
747
1040
  }
748
1041
  },
749
- "name": "resources_resource_tag_assignments",
750
- "schema": "public",
751
1042
  "indexes": [
752
1043
  {
753
- "keyName": "resources_resource_tag_assignments_scope_idx",
754
- "columnNames": [
755
- "organization_id",
756
- "tenant_id"
757
- ],
758
- "composite": true,
759
- "constraint": false,
760
- "primary": false,
761
- "unique": false
762
- },
763
- {
764
- "keyName": "resources_resource_tag_assignments_unique",
765
- "columnNames": [
766
- "tag_id",
767
- "resource_id"
768
- ],
769
- "composite": true,
770
- "constraint": true,
771
- "primary": false,
772
- "unique": true
773
- },
774
- {
775
- "keyName": "resources_resource_tag_assignments_pkey",
776
1044
  "columnNames": [
777
1045
  "id"
778
1046
  ],
779
1047
  "composite": false,
780
1048
  "constraint": true,
1049
+ "keyName": "resources_resource_types_pkey",
781
1050
  "primary": true,
782
1051
  "unique": true
783
- }
784
- ],
785
- "checks": [],
786
- "foreignKeys": {
787
- "resources_resource_tag_assignments_tag_id_foreign": {
788
- "constraintName": "resources_resource_tag_assignments_tag_id_foreign",
789
- "columnNames": [
790
- "tag_id"
791
- ],
792
- "localTableName": "public.resources_resource_tag_assignments",
793
- "referencedColumnNames": [
794
- "id"
795
- ],
796
- "referencedTableName": "public.resources_resource_tags",
797
- "updateRule": "cascade"
798
1052
  },
799
- "resources_resource_tag_assignments_resource_id_foreign": {
800
- "constraintName": "resources_resource_tag_assignments_resource_id_foreign",
1053
+ {
801
1054
  "columnNames": [
802
- "resource_id"
803
- ],
804
- "localTableName": "public.resources_resource_tag_assignments",
805
- "referencedColumnNames": [
806
- "id"
1055
+ "tenant_id",
1056
+ "organization_id"
807
1057
  ],
808
- "referencedTableName": "public.resources_resources",
809
- "updateRule": "cascade"
1058
+ "composite": true,
1059
+ "constraint": false,
1060
+ "keyName": "resources_resource_types_tenant_org_idx",
1061
+ "primary": false,
1062
+ "unique": false
810
1063
  }
811
- },
812
- "nativeEnums": {}
1064
+ ],
1065
+ "checks": [],
1066
+ "foreignKeys": {},
1067
+ "comment": null
813
1068
  },
814
1069
  {
1070
+ "name": "resources_resources",
1071
+ "schema": "public",
815
1072
  "columns": {
816
- "id": {
817
- "name": "id",
818
- "type": "uuid",
1073
+ "appearance_color": {
1074
+ "name": "appearance_color",
1075
+ "type": "text",
819
1076
  "unsigned": false,
820
1077
  "autoincrement": false,
821
1078
  "primary": false,
822
- "nullable": false,
823
- "default": "gen_random_uuid()",
824
- "mappedType": "uuid"
1079
+ "nullable": true,
1080
+ "unique": false,
1081
+ "length": null,
1082
+ "precision": null,
1083
+ "scale": null,
1084
+ "default": null,
1085
+ "comment": null,
1086
+ "enumItems": [],
1087
+ "mappedType": "text"
825
1088
  },
826
- "tenant_id": {
827
- "name": "tenant_id",
828
- "type": "uuid",
1089
+ "appearance_icon": {
1090
+ "name": "appearance_icon",
1091
+ "type": "text",
829
1092
  "unsigned": false,
830
1093
  "autoincrement": false,
831
1094
  "primary": false,
832
- "nullable": false,
833
- "mappedType": "uuid"
1095
+ "nullable": true,
1096
+ "unique": false,
1097
+ "length": null,
1098
+ "precision": null,
1099
+ "scale": null,
1100
+ "default": null,
1101
+ "comment": null,
1102
+ "enumItems": [],
1103
+ "mappedType": "text"
834
1104
  },
835
- "organization_id": {
836
- "name": "organization_id",
1105
+ "availability_rule_set_id": {
1106
+ "name": "availability_rule_set_id",
837
1107
  "type": "uuid",
838
1108
  "unsigned": false,
839
1109
  "autoincrement": false,
840
1110
  "primary": false,
841
- "nullable": false,
1111
+ "nullable": true,
1112
+ "unique": false,
1113
+ "length": null,
1114
+ "precision": null,
1115
+ "scale": null,
1116
+ "default": null,
1117
+ "comment": null,
1118
+ "enumItems": [],
842
1119
  "mappedType": "uuid"
843
1120
  },
844
- "name": {
845
- "name": "name",
1121
+ "capacity": {
1122
+ "name": "capacity",
1123
+ "type": "int",
1124
+ "unsigned": false,
1125
+ "autoincrement": false,
1126
+ "primary": false,
1127
+ "nullable": true,
1128
+ "unique": false,
1129
+ "length": null,
1130
+ "precision": null,
1131
+ "scale": null,
1132
+ "default": null,
1133
+ "comment": null,
1134
+ "enumItems": [],
1135
+ "mappedType": "integer"
1136
+ },
1137
+ "capacity_unit_color": {
1138
+ "name": "capacity_unit_color",
846
1139
  "type": "text",
847
1140
  "unsigned": false,
848
1141
  "autoincrement": false,
849
1142
  "primary": false,
850
- "nullable": false,
1143
+ "nullable": true,
1144
+ "unique": false,
1145
+ "length": null,
1146
+ "precision": null,
1147
+ "scale": null,
1148
+ "default": null,
1149
+ "comment": null,
1150
+ "enumItems": [],
851
1151
  "mappedType": "text"
852
1152
  },
853
- "description": {
854
- "name": "description",
1153
+ "capacity_unit_icon": {
1154
+ "name": "capacity_unit_icon",
855
1155
  "type": "text",
856
1156
  "unsigned": false,
857
1157
  "autoincrement": false,
858
1158
  "primary": false,
859
1159
  "nullable": true,
1160
+ "unique": false,
1161
+ "length": null,
1162
+ "precision": null,
1163
+ "scale": null,
1164
+ "default": null,
1165
+ "comment": null,
1166
+ "enumItems": [],
860
1167
  "mappedType": "text"
861
1168
  },
862
- "appearance_icon": {
863
- "name": "appearance_icon",
1169
+ "capacity_unit_name": {
1170
+ "name": "capacity_unit_name",
864
1171
  "type": "text",
865
1172
  "unsigned": false,
866
1173
  "autoincrement": false,
867
1174
  "primary": false,
868
1175
  "nullable": true,
1176
+ "unique": false,
1177
+ "length": null,
1178
+ "precision": null,
1179
+ "scale": null,
1180
+ "default": null,
1181
+ "comment": null,
1182
+ "enumItems": [],
869
1183
  "mappedType": "text"
870
1184
  },
871
- "appearance_color": {
872
- "name": "appearance_color",
1185
+ "capacity_unit_value": {
1186
+ "name": "capacity_unit_value",
873
1187
  "type": "text",
874
1188
  "unsigned": false,
875
1189
  "autoincrement": false,
876
1190
  "primary": false,
877
1191
  "nullable": true,
1192
+ "unique": false,
1193
+ "length": null,
1194
+ "precision": null,
1195
+ "scale": null,
1196
+ "default": null,
1197
+ "comment": null,
1198
+ "enumItems": [],
878
1199
  "mappedType": "text"
879
1200
  },
880
1201
  "created_at": {
881
1202
  "name": "created_at",
882
- "type": "timestamptz",
1203
+ "type": "timestamptz(6)",
883
1204
  "unsigned": false,
884
1205
  "autoincrement": false,
885
1206
  "primary": false,
886
1207
  "nullable": false,
1208
+ "unique": false,
887
1209
  "length": 6,
1210
+ "precision": null,
1211
+ "scale": null,
1212
+ "default": null,
1213
+ "comment": null,
1214
+ "enumItems": [],
888
1215
  "mappedType": "datetime"
889
1216
  },
890
- "updated_at": {
891
- "name": "updated_at",
892
- "type": "timestamptz",
1217
+ "deleted_at": {
1218
+ "name": "deleted_at",
1219
+ "type": "timestamptz(6)",
893
1220
  "unsigned": false,
894
1221
  "autoincrement": false,
895
1222
  "primary": false,
896
- "nullable": false,
1223
+ "nullable": true,
1224
+ "unique": false,
897
1225
  "length": 6,
1226
+ "precision": null,
1227
+ "scale": null,
1228
+ "default": null,
1229
+ "comment": null,
1230
+ "enumItems": [],
898
1231
  "mappedType": "datetime"
899
1232
  },
900
- "deleted_at": {
901
- "name": "deleted_at",
902
- "type": "timestamptz",
1233
+ "description": {
1234
+ "name": "description",
1235
+ "type": "text",
1236
+ "unsigned": false,
1237
+ "autoincrement": false,
1238
+ "primary": false,
1239
+ "nullable": true,
1240
+ "unique": false,
1241
+ "length": null,
1242
+ "precision": null,
1243
+ "scale": null,
1244
+ "default": null,
1245
+ "comment": null,
1246
+ "enumItems": [],
1247
+ "mappedType": "text"
1248
+ },
1249
+ "id": {
1250
+ "name": "id",
1251
+ "type": "uuid",
1252
+ "unsigned": false,
1253
+ "autoincrement": false,
1254
+ "primary": true,
1255
+ "nullable": false,
1256
+ "unique": false,
1257
+ "length": null,
1258
+ "precision": null,
1259
+ "scale": null,
1260
+ "default": "gen_random_uuid()",
1261
+ "comment": null,
1262
+ "enumItems": [],
1263
+ "mappedType": "uuid"
1264
+ },
1265
+ "is_active": {
1266
+ "name": "is_active",
1267
+ "type": "boolean",
1268
+ "unsigned": false,
1269
+ "autoincrement": false,
1270
+ "primary": false,
1271
+ "nullable": false,
1272
+ "unique": false,
1273
+ "length": null,
1274
+ "precision": null,
1275
+ "scale": null,
1276
+ "default": "true",
1277
+ "comment": null,
1278
+ "enumItems": [],
1279
+ "mappedType": "boolean"
1280
+ },
1281
+ "name": {
1282
+ "name": "name",
1283
+ "type": "text",
1284
+ "unsigned": false,
1285
+ "autoincrement": false,
1286
+ "primary": false,
1287
+ "nullable": false,
1288
+ "unique": false,
1289
+ "length": null,
1290
+ "precision": null,
1291
+ "scale": null,
1292
+ "default": null,
1293
+ "comment": null,
1294
+ "enumItems": [],
1295
+ "mappedType": "text"
1296
+ },
1297
+ "organization_id": {
1298
+ "name": "organization_id",
1299
+ "type": "uuid",
1300
+ "unsigned": false,
1301
+ "autoincrement": false,
1302
+ "primary": false,
1303
+ "nullable": false,
1304
+ "unique": false,
1305
+ "length": null,
1306
+ "precision": null,
1307
+ "scale": null,
1308
+ "default": null,
1309
+ "comment": null,
1310
+ "enumItems": [],
1311
+ "mappedType": "uuid"
1312
+ },
1313
+ "resource_type_id": {
1314
+ "name": "resource_type_id",
1315
+ "type": "uuid",
903
1316
  "unsigned": false,
904
1317
  "autoincrement": false,
905
1318
  "primary": false,
906
1319
  "nullable": true,
1320
+ "unique": false,
1321
+ "length": null,
1322
+ "precision": null,
1323
+ "scale": null,
1324
+ "default": null,
1325
+ "comment": null,
1326
+ "enumItems": [],
1327
+ "mappedType": "uuid"
1328
+ },
1329
+ "tenant_id": {
1330
+ "name": "tenant_id",
1331
+ "type": "uuid",
1332
+ "unsigned": false,
1333
+ "autoincrement": false,
1334
+ "primary": false,
1335
+ "nullable": false,
1336
+ "unique": false,
1337
+ "length": null,
1338
+ "precision": null,
1339
+ "scale": null,
1340
+ "default": null,
1341
+ "comment": null,
1342
+ "enumItems": [],
1343
+ "mappedType": "uuid"
1344
+ },
1345
+ "updated_at": {
1346
+ "name": "updated_at",
1347
+ "type": "timestamptz(6)",
1348
+ "unsigned": false,
1349
+ "autoincrement": false,
1350
+ "primary": false,
1351
+ "nullable": false,
1352
+ "unique": false,
907
1353
  "length": 6,
1354
+ "precision": null,
1355
+ "scale": null,
1356
+ "default": null,
1357
+ "comment": null,
1358
+ "enumItems": [],
908
1359
  "mappedType": "datetime"
909
1360
  }
910
1361
  },
911
- "name": "resources_resource_types",
912
- "schema": "public",
913
1362
  "indexes": [
914
1363
  {
915
- "keyName": "resources_resource_types_tenant_org_idx",
1364
+ "columnNames": [
1365
+ "id"
1366
+ ],
1367
+ "composite": false,
1368
+ "constraint": true,
1369
+ "keyName": "resources_resources_pkey",
1370
+ "primary": true,
1371
+ "unique": true
1372
+ },
1373
+ {
916
1374
  "columnNames": [
917
1375
  "tenant_id",
918
1376
  "organization_id"
919
1377
  ],
920
1378
  "composite": true,
921
1379
  "constraint": false,
1380
+ "keyName": "resources_resources_tenant_org_idx",
922
1381
  "primary": false,
923
1382
  "unique": false
924
- },
925
- {
926
- "keyName": "resources_resource_types_pkey",
927
- "columnNames": [
928
- "id"
929
- ],
930
- "composite": false,
931
- "constraint": true,
932
- "primary": true,
933
- "unique": true
934
1383
  }
935
1384
  ],
936
1385
  "checks": [],
937
1386
  "foreignKeys": {},
938
- "nativeEnums": {}
1387
+ "comment": null
939
1388
  }
940
1389
  ],
1390
+ "views": [],
941
1391
  "nativeEnums": {}
942
- }
1392
+ }