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

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 +15 -6
  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,40 +1,76 @@
1
1
  {
2
+ "name": "public",
2
3
  "namespaces": [
3
4
  "public"
4
5
  ],
5
- "name": "public",
6
6
  "tables": [
7
7
  {
8
+ "name": "business_rules",
9
+ "schema": "public",
8
10
  "columns": {
9
- "id": {
10
- "name": "id",
11
- "type": "uuid",
11
+ "condition_expression": {
12
+ "name": "condition_expression",
13
+ "type": "jsonb",
14
+ "unsigned": false,
15
+ "autoincrement": false,
16
+ "primary": false,
17
+ "nullable": true,
18
+ "unique": false,
19
+ "length": null,
20
+ "precision": null,
21
+ "scale": null,
22
+ "default": null,
23
+ "comment": null,
24
+ "enumItems": [],
25
+ "mappedType": "json"
26
+ },
27
+ "created_at": {
28
+ "name": "created_at",
29
+ "type": "timestamptz(6)",
12
30
  "unsigned": false,
13
31
  "autoincrement": false,
14
32
  "primary": false,
15
33
  "nullable": false,
16
- "default": "gen_random_uuid()",
17
- "mappedType": "uuid"
34
+ "unique": false,
35
+ "length": 6,
36
+ "precision": null,
37
+ "scale": null,
38
+ "default": null,
39
+ "comment": null,
40
+ "enumItems": [],
41
+ "mappedType": "datetime"
18
42
  },
19
- "rule_id": {
20
- "name": "rule_id",
43
+ "created_by": {
44
+ "name": "created_by",
21
45
  "type": "varchar(50)",
22
46
  "unsigned": false,
23
47
  "autoincrement": false,
24
48
  "primary": false,
25
- "nullable": false,
49
+ "nullable": true,
50
+ "unique": false,
26
51
  "length": 50,
52
+ "precision": null,
53
+ "scale": null,
54
+ "default": null,
55
+ "comment": null,
56
+ "enumItems": [],
27
57
  "mappedType": "string"
28
58
  },
29
- "rule_name": {
30
- "name": "rule_name",
31
- "type": "varchar(200)",
59
+ "deleted_at": {
60
+ "name": "deleted_at",
61
+ "type": "timestamptz(6)",
32
62
  "unsigned": false,
33
63
  "autoincrement": false,
34
64
  "primary": false,
35
- "nullable": false,
36
- "length": 200,
37
- "mappedType": "string"
65
+ "nullable": true,
66
+ "unique": false,
67
+ "length": 6,
68
+ "precision": null,
69
+ "scale": null,
70
+ "default": null,
71
+ "comment": null,
72
+ "enumItems": [],
73
+ "mappedType": "datetime"
38
74
  },
39
75
  "description": {
40
76
  "name": "description",
@@ -43,27 +79,62 @@
43
79
  "autoincrement": false,
44
80
  "primary": false,
45
81
  "nullable": true,
82
+ "unique": false,
83
+ "length": null,
84
+ "precision": null,
85
+ "scale": null,
86
+ "default": null,
87
+ "comment": null,
88
+ "enumItems": [],
46
89
  "mappedType": "text"
47
90
  },
48
- "rule_type": {
49
- "name": "rule_type",
50
- "type": "varchar(20)",
91
+ "effective_from": {
92
+ "name": "effective_from",
93
+ "type": "timestamptz(6)",
51
94
  "unsigned": false,
52
95
  "autoincrement": false,
53
96
  "primary": false,
54
- "nullable": false,
55
- "length": 20,
56
- "mappedType": "string"
97
+ "nullable": true,
98
+ "unique": false,
99
+ "length": 6,
100
+ "precision": null,
101
+ "scale": null,
102
+ "default": null,
103
+ "comment": null,
104
+ "enumItems": [],
105
+ "mappedType": "datetime"
57
106
  },
58
- "rule_category": {
59
- "name": "rule_category",
60
- "type": "varchar(50)",
107
+ "effective_to": {
108
+ "name": "effective_to",
109
+ "type": "timestamptz(6)",
61
110
  "unsigned": false,
62
111
  "autoincrement": false,
63
112
  "primary": false,
64
113
  "nullable": true,
65
- "length": 50,
66
- "mappedType": "string"
114
+ "unique": false,
115
+ "length": 6,
116
+ "precision": null,
117
+ "scale": null,
118
+ "default": null,
119
+ "comment": null,
120
+ "enumItems": [],
121
+ "mappedType": "datetime"
122
+ },
123
+ "enabled": {
124
+ "name": "enabled",
125
+ "type": "boolean",
126
+ "unsigned": false,
127
+ "autoincrement": false,
128
+ "primary": false,
129
+ "nullable": false,
130
+ "unique": false,
131
+ "length": null,
132
+ "precision": null,
133
+ "scale": null,
134
+ "default": "true",
135
+ "comment": null,
136
+ "enumItems": [],
137
+ "mappedType": "boolean"
67
138
  },
68
139
  "entity_type": {
69
140
  "name": "entity_type",
@@ -72,7 +143,13 @@
72
143
  "autoincrement": false,
73
144
  "primary": false,
74
145
  "nullable": false,
146
+ "unique": false,
75
147
  "length": 50,
148
+ "precision": null,
149
+ "scale": null,
150
+ "default": null,
151
+ "comment": null,
152
+ "enumItems": [],
76
153
  "mappedType": "string"
77
154
  },
78
155
  "event_type": {
@@ -82,27 +159,15 @@
82
159
  "autoincrement": false,
83
160
  "primary": false,
84
161
  "nullable": true,
162
+ "unique": false,
85
163
  "length": 50,
164
+ "precision": null,
165
+ "scale": null,
166
+ "default": null,
167
+ "comment": null,
168
+ "enumItems": [],
86
169
  "mappedType": "string"
87
170
  },
88
- "condition_expression": {
89
- "name": "condition_expression",
90
- "type": "jsonb",
91
- "unsigned": false,
92
- "autoincrement": false,
93
- "primary": false,
94
- "nullable": true,
95
- "mappedType": "json"
96
- },
97
- "success_actions": {
98
- "name": "success_actions",
99
- "type": "jsonb",
100
- "unsigned": false,
101
- "autoincrement": false,
102
- "primary": false,
103
- "nullable": true,
104
- "mappedType": "json"
105
- },
106
171
  "failure_actions": {
107
172
  "name": "failure_actions",
108
173
  "type": "jsonb",
@@ -110,211 +175,274 @@
110
175
  "autoincrement": false,
111
176
  "primary": false,
112
177
  "nullable": true,
178
+ "unique": false,
179
+ "length": null,
180
+ "precision": null,
181
+ "scale": null,
182
+ "default": null,
183
+ "comment": null,
184
+ "enumItems": [],
113
185
  "mappedType": "json"
114
186
  },
115
- "enabled": {
116
- "name": "enabled",
117
- "type": "boolean",
187
+ "id": {
188
+ "name": "id",
189
+ "type": "uuid",
118
190
  "unsigned": false,
119
191
  "autoincrement": false,
120
- "primary": false,
192
+ "primary": true,
121
193
  "nullable": false,
122
- "default": "true",
123
- "mappedType": "boolean"
194
+ "unique": false,
195
+ "length": null,
196
+ "precision": null,
197
+ "scale": null,
198
+ "default": "gen_random_uuid()",
199
+ "comment": null,
200
+ "enumItems": [],
201
+ "mappedType": "uuid"
124
202
  },
125
- "priority": {
126
- "name": "priority",
127
- "type": "int",
203
+ "organization_id": {
204
+ "name": "organization_id",
205
+ "type": "uuid",
128
206
  "unsigned": false,
129
207
  "autoincrement": false,
130
208
  "primary": false,
131
209
  "nullable": false,
132
- "default": "100",
133
- "mappedType": "integer"
210
+ "unique": false,
211
+ "length": null,
212
+ "precision": null,
213
+ "scale": null,
214
+ "default": null,
215
+ "comment": null,
216
+ "enumItems": [],
217
+ "mappedType": "uuid"
134
218
  },
135
- "version": {
136
- "name": "version",
219
+ "priority": {
220
+ "name": "priority",
137
221
  "type": "int",
138
222
  "unsigned": false,
139
223
  "autoincrement": false,
140
224
  "primary": false,
141
225
  "nullable": false,
142
- "default": "1",
226
+ "unique": false,
227
+ "length": null,
228
+ "precision": null,
229
+ "scale": null,
230
+ "default": "100",
231
+ "comment": null,
232
+ "enumItems": [],
143
233
  "mappedType": "integer"
144
234
  },
145
- "effective_from": {
146
- "name": "effective_from",
147
- "type": "timestamptz",
148
- "unsigned": false,
149
- "autoincrement": false,
150
- "primary": false,
151
- "nullable": true,
152
- "length": 6,
153
- "mappedType": "datetime"
154
- },
155
- "effective_to": {
156
- "name": "effective_to",
157
- "type": "timestamptz",
235
+ "rule_category": {
236
+ "name": "rule_category",
237
+ "type": "varchar(50)",
158
238
  "unsigned": false,
159
239
  "autoincrement": false,
160
240
  "primary": false,
161
241
  "nullable": true,
162
- "length": 6,
163
- "mappedType": "datetime"
242
+ "unique": false,
243
+ "length": 50,
244
+ "precision": null,
245
+ "scale": null,
246
+ "default": null,
247
+ "comment": null,
248
+ "enumItems": [],
249
+ "mappedType": "string"
164
250
  },
165
- "tenant_id": {
166
- "name": "tenant_id",
167
- "type": "uuid",
251
+ "rule_id": {
252
+ "name": "rule_id",
253
+ "type": "varchar(50)",
168
254
  "unsigned": false,
169
255
  "autoincrement": false,
170
256
  "primary": false,
171
257
  "nullable": false,
172
- "mappedType": "uuid"
258
+ "unique": true,
259
+ "length": 50,
260
+ "precision": null,
261
+ "scale": null,
262
+ "default": null,
263
+ "comment": null,
264
+ "enumItems": [],
265
+ "mappedType": "string"
173
266
  },
174
- "organization_id": {
175
- "name": "organization_id",
176
- "type": "uuid",
267
+ "rule_name": {
268
+ "name": "rule_name",
269
+ "type": "varchar(200)",
177
270
  "unsigned": false,
178
271
  "autoincrement": false,
179
272
  "primary": false,
180
273
  "nullable": false,
181
- "mappedType": "uuid"
274
+ "unique": false,
275
+ "length": 200,
276
+ "precision": null,
277
+ "scale": null,
278
+ "default": null,
279
+ "comment": null,
280
+ "enumItems": [],
281
+ "mappedType": "string"
182
282
  },
183
- "created_by": {
184
- "name": "created_by",
185
- "type": "varchar(50)",
283
+ "rule_type": {
284
+ "name": "rule_type",
285
+ "type": "varchar(20)",
186
286
  "unsigned": false,
187
287
  "autoincrement": false,
188
288
  "primary": false,
189
- "nullable": true,
190
- "length": 50,
289
+ "nullable": false,
290
+ "unique": false,
291
+ "length": 20,
292
+ "precision": null,
293
+ "scale": null,
294
+ "default": null,
295
+ "comment": null,
296
+ "enumItems": [],
191
297
  "mappedType": "string"
192
298
  },
193
- "updated_by": {
194
- "name": "updated_by",
195
- "type": "varchar(50)",
299
+ "success_actions": {
300
+ "name": "success_actions",
301
+ "type": "jsonb",
196
302
  "unsigned": false,
197
303
  "autoincrement": false,
198
304
  "primary": false,
199
305
  "nullable": true,
200
- "length": 50,
201
- "mappedType": "string"
306
+ "unique": false,
307
+ "length": null,
308
+ "precision": null,
309
+ "scale": null,
310
+ "default": null,
311
+ "comment": null,
312
+ "enumItems": [],
313
+ "mappedType": "json"
202
314
  },
203
- "created_at": {
204
- "name": "created_at",
205
- "type": "timestamptz",
315
+ "tenant_id": {
316
+ "name": "tenant_id",
317
+ "type": "uuid",
206
318
  "unsigned": false,
207
319
  "autoincrement": false,
208
320
  "primary": false,
209
321
  "nullable": false,
210
- "length": 6,
211
- "mappedType": "datetime"
322
+ "unique": false,
323
+ "length": null,
324
+ "precision": null,
325
+ "scale": null,
326
+ "default": null,
327
+ "comment": null,
328
+ "enumItems": [],
329
+ "mappedType": "uuid"
212
330
  },
213
331
  "updated_at": {
214
332
  "name": "updated_at",
215
- "type": "timestamptz",
333
+ "type": "timestamptz(6)",
216
334
  "unsigned": false,
217
335
  "autoincrement": false,
218
336
  "primary": false,
219
337
  "nullable": false,
338
+ "unique": false,
220
339
  "length": 6,
340
+ "precision": null,
341
+ "scale": null,
342
+ "default": null,
343
+ "comment": null,
344
+ "enumItems": [],
221
345
  "mappedType": "datetime"
222
346
  },
223
- "deleted_at": {
224
- "name": "deleted_at",
225
- "type": "timestamptz",
347
+ "updated_by": {
348
+ "name": "updated_by",
349
+ "type": "varchar(50)",
226
350
  "unsigned": false,
227
351
  "autoincrement": false,
228
352
  "primary": false,
229
353
  "nullable": true,
230
- "length": 6,
231
- "mappedType": "datetime"
354
+ "unique": false,
355
+ "length": 50,
356
+ "precision": null,
357
+ "scale": null,
358
+ "default": null,
359
+ "comment": null,
360
+ "enumItems": [],
361
+ "mappedType": "string"
362
+ },
363
+ "version": {
364
+ "name": "version",
365
+ "type": "int",
366
+ "unsigned": false,
367
+ "autoincrement": false,
368
+ "primary": false,
369
+ "nullable": false,
370
+ "unique": false,
371
+ "length": null,
372
+ "precision": null,
373
+ "scale": null,
374
+ "default": "1",
375
+ "comment": null,
376
+ "enumItems": [],
377
+ "mappedType": "integer"
232
378
  }
233
379
  },
234
- "name": "business_rules",
235
- "schema": "public",
236
380
  "indexes": [
237
381
  {
238
- "keyName": "business_rules_type_enabled_idx",
239
382
  "columnNames": [
240
- "rule_type",
241
- "enabled",
242
- "priority"
383
+ "entity_type",
384
+ "event_type",
385
+ "enabled"
243
386
  ],
244
387
  "composite": true,
245
388
  "constraint": false,
389
+ "keyName": "business_rules_entity_event_idx",
246
390
  "primary": false,
247
391
  "unique": false
248
392
  },
249
393
  {
250
- "keyName": "business_rules_tenant_org_idx",
251
394
  "columnNames": [
252
- "tenant_id",
253
- "organization_id"
395
+ "id"
254
396
  ],
255
- "composite": true,
256
- "constraint": false,
257
- "primary": false,
258
- "unique": false
397
+ "composite": false,
398
+ "constraint": true,
399
+ "keyName": "business_rules_pkey",
400
+ "primary": true,
401
+ "unique": true
259
402
  },
260
403
  {
261
- "keyName": "business_rules_entity_event_idx",
262
404
  "columnNames": [
263
- "entity_type",
264
- "event_type",
265
- "enabled"
405
+ "rule_id",
406
+ "tenant_id"
266
407
  ],
267
408
  "composite": true,
268
- "constraint": false,
409
+ "constraint": true,
410
+ "keyName": "business_rules_rule_id_tenant_id_unique",
269
411
  "primary": false,
270
- "unique": false
412
+ "unique": true
271
413
  },
272
414
  {
273
- "keyName": "business_rules_rule_id_tenant_id_unique",
274
415
  "columnNames": [
275
- "rule_id",
276
- "tenant_id"
416
+ "tenant_id",
417
+ "organization_id"
277
418
  ],
278
419
  "composite": true,
279
- "constraint": true,
420
+ "constraint": false,
421
+ "keyName": "business_rules_tenant_org_idx",
280
422
  "primary": false,
281
- "unique": true
423
+ "unique": false
282
424
  },
283
425
  {
284
- "keyName": "business_rules_pkey",
285
426
  "columnNames": [
286
- "id"
427
+ "rule_type",
428
+ "enabled",
429
+ "priority"
287
430
  ],
288
- "composite": false,
289
- "constraint": true,
290
- "primary": true,
291
- "unique": true
431
+ "composite": true,
432
+ "constraint": false,
433
+ "keyName": "business_rules_type_enabled_idx",
434
+ "primary": false,
435
+ "unique": false
292
436
  }
293
437
  ],
294
438
  "checks": [],
295
439
  "foreignKeys": {},
296
- "nativeEnums": {}
440
+ "comment": null
297
441
  },
298
442
  {
443
+ "name": "rule_execution_logs",
444
+ "schema": "public",
299
445
  "columns": {
300
- "id": {
301
- "name": "id",
302
- "type": "bigserial",
303
- "unsigned": false,
304
- "autoincrement": true,
305
- "primary": true,
306
- "nullable": false,
307
- "mappedType": "bigint"
308
- },
309
- "rule_id": {
310
- "name": "rule_id",
311
- "type": "uuid",
312
- "unsigned": false,
313
- "autoincrement": false,
314
- "primary": false,
315
- "nullable": false,
316
- "mappedType": "uuid"
317
- },
318
446
  "entity_id": {
319
447
  "name": "entity_id",
320
448
  "type": "varchar(255)",
@@ -322,7 +450,13 @@
322
450
  "autoincrement": false,
323
451
  "primary": false,
324
452
  "nullable": false,
453
+ "unique": false,
325
454
  "length": 255,
455
+ "precision": null,
456
+ "scale": null,
457
+ "default": null,
458
+ "comment": null,
459
+ "enumItems": [],
326
460
  "mappedType": "string"
327
461
  },
328
462
  "entity_type": {
@@ -332,45 +466,78 @@
332
466
  "autoincrement": false,
333
467
  "primary": false,
334
468
  "nullable": false,
469
+ "unique": false,
335
470
  "length": 50,
471
+ "precision": null,
472
+ "scale": null,
473
+ "default": null,
474
+ "comment": null,
475
+ "enumItems": [],
336
476
  "mappedType": "string"
337
477
  },
338
- "execution_result": {
339
- "name": "execution_result",
340
- "type": "varchar(20)",
478
+ "error_message": {
479
+ "name": "error_message",
480
+ "type": "text",
341
481
  "unsigned": false,
342
482
  "autoincrement": false,
343
483
  "primary": false,
344
- "nullable": false,
345
- "length": 20,
346
- "mappedType": "string"
484
+ "nullable": true,
485
+ "unique": false,
486
+ "length": null,
487
+ "precision": null,
488
+ "scale": null,
489
+ "default": null,
490
+ "comment": null,
491
+ "enumItems": [],
492
+ "mappedType": "text"
347
493
  },
348
- "input_context": {
349
- "name": "input_context",
350
- "type": "jsonb",
494
+ "executed_at": {
495
+ "name": "executed_at",
496
+ "type": "timestamptz(6)",
351
497
  "unsigned": false,
352
498
  "autoincrement": false,
353
499
  "primary": false,
354
- "nullable": true,
355
- "mappedType": "json"
500
+ "nullable": false,
501
+ "unique": false,
502
+ "length": 6,
503
+ "precision": null,
504
+ "scale": null,
505
+ "default": null,
506
+ "comment": null,
507
+ "enumItems": [],
508
+ "mappedType": "datetime"
356
509
  },
357
- "output_context": {
358
- "name": "output_context",
359
- "type": "jsonb",
510
+ "executed_by": {
511
+ "name": "executed_by",
512
+ "type": "varchar(50)",
360
513
  "unsigned": false,
361
514
  "autoincrement": false,
362
515
  "primary": false,
363
516
  "nullable": true,
364
- "mappedType": "json"
517
+ "unique": false,
518
+ "length": 50,
519
+ "precision": null,
520
+ "scale": null,
521
+ "default": null,
522
+ "comment": null,
523
+ "enumItems": [],
524
+ "mappedType": "string"
365
525
  },
366
- "error_message": {
367
- "name": "error_message",
368
- "type": "text",
526
+ "execution_result": {
527
+ "name": "execution_result",
528
+ "type": "varchar(20)",
369
529
  "unsigned": false,
370
530
  "autoincrement": false,
371
531
  "primary": false,
372
- "nullable": true,
373
- "mappedType": "text"
532
+ "nullable": false,
533
+ "unique": false,
534
+ "length": 20,
535
+ "precision": null,
536
+ "scale": null,
537
+ "default": null,
538
+ "comment": null,
539
+ "enumItems": [],
540
+ "mappedType": "string"
374
541
  },
375
542
  "execution_time_ms": {
376
543
  "name": "execution_time_ms",
@@ -379,26 +546,46 @@
379
546
  "autoincrement": false,
380
547
  "primary": false,
381
548
  "nullable": false,
549
+ "unique": false,
550
+ "length": null,
551
+ "precision": null,
552
+ "scale": null,
553
+ "default": null,
554
+ "comment": null,
555
+ "enumItems": [],
382
556
  "mappedType": "integer"
383
557
  },
384
- "executed_at": {
385
- "name": "executed_at",
386
- "type": "timestamptz",
558
+ "id": {
559
+ "name": "id",
560
+ "type": "bigint",
387
561
  "unsigned": false,
388
- "autoincrement": false,
389
- "primary": false,
562
+ "autoincrement": true,
563
+ "primary": true,
390
564
  "nullable": false,
391
- "length": 6,
392
- "mappedType": "datetime"
565
+ "unique": false,
566
+ "length": null,
567
+ "precision": null,
568
+ "scale": null,
569
+ "default": null,
570
+ "comment": null,
571
+ "enumItems": [],
572
+ "mappedType": "bigint"
393
573
  },
394
- "tenant_id": {
395
- "name": "tenant_id",
396
- "type": "uuid",
574
+ "input_context": {
575
+ "name": "input_context",
576
+ "type": "jsonb",
397
577
  "unsigned": false,
398
578
  "autoincrement": false,
399
579
  "primary": false,
400
- "nullable": false,
401
- "mappedType": "uuid"
580
+ "nullable": true,
581
+ "unique": false,
582
+ "length": null,
583
+ "precision": null,
584
+ "scale": null,
585
+ "default": null,
586
+ "comment": null,
587
+ "enumItems": [],
588
+ "mappedType": "json"
402
589
  },
403
590
  "organization_id": {
404
591
  "name": "organization_id",
@@ -407,134 +594,154 @@
407
594
  "autoincrement": false,
408
595
  "primary": false,
409
596
  "nullable": true,
597
+ "unique": false,
598
+ "length": null,
599
+ "precision": null,
600
+ "scale": null,
601
+ "default": null,
602
+ "comment": null,
603
+ "enumItems": [],
410
604
  "mappedType": "uuid"
411
605
  },
412
- "executed_by": {
413
- "name": "executed_by",
414
- "type": "varchar(50)",
606
+ "output_context": {
607
+ "name": "output_context",
608
+ "type": "jsonb",
415
609
  "unsigned": false,
416
610
  "autoincrement": false,
417
611
  "primary": false,
418
612
  "nullable": true,
419
- "length": 50,
420
- "mappedType": "string"
613
+ "unique": false,
614
+ "length": null,
615
+ "precision": null,
616
+ "scale": null,
617
+ "default": null,
618
+ "comment": null,
619
+ "enumItems": [],
620
+ "mappedType": "json"
621
+ },
622
+ "rule_id": {
623
+ "name": "rule_id",
624
+ "type": "uuid",
625
+ "unsigned": false,
626
+ "autoincrement": false,
627
+ "primary": false,
628
+ "nullable": false,
629
+ "unique": false,
630
+ "length": null,
631
+ "precision": null,
632
+ "scale": null,
633
+ "default": null,
634
+ "comment": null,
635
+ "enumItems": [],
636
+ "mappedType": "uuid"
637
+ },
638
+ "tenant_id": {
639
+ "name": "tenant_id",
640
+ "type": "uuid",
641
+ "unsigned": false,
642
+ "autoincrement": false,
643
+ "primary": false,
644
+ "nullable": false,
645
+ "unique": false,
646
+ "length": null,
647
+ "precision": null,
648
+ "scale": null,
649
+ "default": null,
650
+ "comment": null,
651
+ "enumItems": [],
652
+ "mappedType": "uuid"
421
653
  }
422
654
  },
423
- "name": "rule_execution_logs",
424
- "schema": "public",
425
655
  "indexes": [
426
656
  {
427
- "keyName": "rule_execution_logs_tenant_org_idx",
428
657
  "columnNames": [
429
- "tenant_id",
430
- "organization_id"
658
+ "entity_type",
659
+ "entity_id"
431
660
  ],
432
661
  "composite": true,
433
662
  "constraint": false,
663
+ "keyName": "rule_execution_logs_entity_idx",
434
664
  "primary": false,
435
665
  "unique": false
436
666
  },
437
667
  {
438
- "keyName": "rule_execution_logs_result_idx",
439
668
  "columnNames": [
440
- "execution_result",
441
- "executed_at"
669
+ "id"
442
670
  ],
443
- "composite": true,
444
- "constraint": false,
445
- "primary": false,
446
- "unique": false
671
+ "composite": false,
672
+ "constraint": true,
673
+ "keyName": "rule_execution_logs_pkey",
674
+ "primary": true,
675
+ "unique": true
447
676
  },
448
677
  {
449
- "keyName": "rule_execution_logs_entity_idx",
450
678
  "columnNames": [
451
- "entity_type",
452
- "entity_id"
679
+ "execution_result",
680
+ "executed_at"
453
681
  ],
454
682
  "composite": true,
455
683
  "constraint": false,
684
+ "keyName": "rule_execution_logs_result_idx",
456
685
  "primary": false,
457
686
  "unique": false
458
687
  },
459
688
  {
460
- "keyName": "rule_execution_logs_rule_idx",
461
689
  "columnNames": [
462
690
  "rule_id"
463
691
  ],
464
692
  "composite": false,
465
693
  "constraint": false,
694
+ "keyName": "rule_execution_logs_rule_idx",
466
695
  "primary": false,
467
696
  "unique": false
468
697
  },
469
698
  {
470
- "keyName": "rule_execution_logs_pkey",
471
699
  "columnNames": [
472
- "id"
700
+ "tenant_id",
701
+ "organization_id"
473
702
  ],
474
- "composite": false,
475
- "constraint": true,
476
- "primary": true,
477
- "unique": true
703
+ "composite": true,
704
+ "constraint": false,
705
+ "keyName": "rule_execution_logs_tenant_org_idx",
706
+ "primary": false,
707
+ "unique": false
478
708
  }
479
709
  ],
480
710
  "checks": [],
481
711
  "foreignKeys": {
482
712
  "rule_execution_logs_rule_id_foreign": {
483
- "constraintName": "rule_execution_logs_rule_id_foreign",
484
713
  "columnNames": [
485
714
  "rule_id"
486
715
  ],
716
+ "constraintName": "rule_execution_logs_rule_id_foreign",
487
717
  "localTableName": "public.rule_execution_logs",
488
718
  "referencedColumnNames": [
489
719
  "id"
490
720
  ],
491
- "referencedTableName": "public.business_rules",
492
- "createForeignKeyConstraint": true,
493
- "updateRule": "cascade"
721
+ "referencedTableName": "public.business_rules"
494
722
  }
495
723
  },
496
- "nativeEnums": {}
724
+ "comment": null
497
725
  },
498
726
  {
727
+ "name": "rule_set_members",
728
+ "schema": "public",
499
729
  "columns": {
500
- "id": {
501
- "name": "id",
502
- "type": "uuid",
503
- "unsigned": false,
504
- "autoincrement": false,
505
- "primary": false,
506
- "nullable": false,
507
- "default": "gen_random_uuid()",
508
- "mappedType": "uuid"
509
- },
510
- "set_id": {
511
- "name": "set_id",
512
- "type": "varchar(50)",
513
- "unsigned": false,
514
- "autoincrement": false,
515
- "primary": false,
516
- "nullable": false,
517
- "length": 50,
518
- "mappedType": "string"
519
- },
520
- "set_name": {
521
- "name": "set_name",
522
- "type": "varchar(200)",
730
+ "created_at": {
731
+ "name": "created_at",
732
+ "type": "timestamptz(6)",
523
733
  "unsigned": false,
524
734
  "autoincrement": false,
525
735
  "primary": false,
526
736
  "nullable": false,
527
- "length": 200,
528
- "mappedType": "string"
529
- },
530
- "description": {
531
- "name": "description",
532
- "type": "text",
533
- "unsigned": false,
534
- "autoincrement": false,
535
- "primary": false,
536
- "nullable": true,
537
- "mappedType": "text"
737
+ "unique": false,
738
+ "length": 6,
739
+ "precision": null,
740
+ "scale": null,
741
+ "default": null,
742
+ "comment": null,
743
+ "enumItems": [],
744
+ "mappedType": "datetime"
538
745
  },
539
746
  "enabled": {
540
747
  "name": "enabled",
@@ -543,16 +750,29 @@
543
750
  "autoincrement": false,
544
751
  "primary": false,
545
752
  "nullable": false,
753
+ "unique": false,
754
+ "length": null,
755
+ "precision": null,
756
+ "scale": null,
546
757
  "default": "true",
758
+ "comment": null,
759
+ "enumItems": [],
547
760
  "mappedType": "boolean"
548
761
  },
549
- "tenant_id": {
550
- "name": "tenant_id",
762
+ "id": {
763
+ "name": "id",
551
764
  "type": "uuid",
552
765
  "unsigned": false,
553
766
  "autoincrement": false,
554
- "primary": false,
767
+ "primary": true,
555
768
  "nullable": false,
769
+ "unique": false,
770
+ "length": null,
771
+ "precision": null,
772
+ "scale": null,
773
+ "default": "gen_random_uuid()",
774
+ "comment": null,
775
+ "enumItems": [],
556
776
  "mappedType": "uuid"
557
777
  },
558
778
  "organization_id": {
@@ -562,148 +782,229 @@
562
782
  "autoincrement": false,
563
783
  "primary": false,
564
784
  "nullable": false,
785
+ "unique": false,
786
+ "length": null,
787
+ "precision": null,
788
+ "scale": null,
789
+ "default": null,
790
+ "comment": null,
791
+ "enumItems": [],
565
792
  "mappedType": "uuid"
566
793
  },
567
- "created_by": {
568
- "name": "created_by",
569
- "type": "varchar(50)",
570
- "unsigned": false,
571
- "autoincrement": false,
572
- "primary": false,
573
- "nullable": true,
574
- "length": 50,
575
- "mappedType": "string"
576
- },
577
- "updated_by": {
578
- "name": "updated_by",
579
- "type": "varchar(50)",
794
+ "rule_id": {
795
+ "name": "rule_id",
796
+ "type": "uuid",
580
797
  "unsigned": false,
581
798
  "autoincrement": false,
582
799
  "primary": false,
583
- "nullable": true,
584
- "length": 50,
585
- "mappedType": "string"
800
+ "nullable": false,
801
+ "unique": false,
802
+ "length": null,
803
+ "precision": null,
804
+ "scale": null,
805
+ "default": null,
806
+ "comment": null,
807
+ "enumItems": [],
808
+ "mappedType": "uuid"
586
809
  },
587
- "created_at": {
588
- "name": "created_at",
589
- "type": "timestamptz",
810
+ "rule_set_id": {
811
+ "name": "rule_set_id",
812
+ "type": "uuid",
590
813
  "unsigned": false,
591
814
  "autoincrement": false,
592
815
  "primary": false,
593
816
  "nullable": false,
594
- "length": 6,
595
- "mappedType": "datetime"
817
+ "unique": true,
818
+ "length": null,
819
+ "precision": null,
820
+ "scale": null,
821
+ "default": null,
822
+ "comment": null,
823
+ "enumItems": [],
824
+ "mappedType": "uuid"
596
825
  },
597
- "updated_at": {
598
- "name": "updated_at",
599
- "type": "timestamptz",
826
+ "sequence": {
827
+ "name": "sequence",
828
+ "type": "int",
600
829
  "unsigned": false,
601
830
  "autoincrement": false,
602
831
  "primary": false,
603
832
  "nullable": false,
604
- "length": 6,
605
- "mappedType": "datetime"
833
+ "unique": false,
834
+ "length": null,
835
+ "precision": null,
836
+ "scale": null,
837
+ "default": "0",
838
+ "comment": null,
839
+ "enumItems": [],
840
+ "mappedType": "integer"
606
841
  },
607
- "deleted_at": {
608
- "name": "deleted_at",
609
- "type": "timestamptz",
842
+ "tenant_id": {
843
+ "name": "tenant_id",
844
+ "type": "uuid",
610
845
  "unsigned": false,
611
846
  "autoincrement": false,
612
847
  "primary": false,
613
- "nullable": true,
614
- "length": 6,
615
- "mappedType": "datetime"
848
+ "nullable": false,
849
+ "unique": false,
850
+ "length": null,
851
+ "precision": null,
852
+ "scale": null,
853
+ "default": null,
854
+ "comment": null,
855
+ "enumItems": [],
856
+ "mappedType": "uuid"
616
857
  }
617
858
  },
618
- "name": "rule_sets",
619
- "schema": "public",
620
859
  "indexes": [
621
860
  {
622
- "keyName": "rule_sets_enabled_idx",
623
861
  "columnNames": [
624
- "enabled"
862
+ "id"
625
863
  ],
626
864
  "composite": false,
627
- "constraint": false,
628
- "primary": false,
629
- "unique": false
865
+ "constraint": true,
866
+ "keyName": "rule_set_members_pkey",
867
+ "primary": true,
868
+ "unique": true
630
869
  },
631
870
  {
632
- "keyName": "rule_sets_tenant_org_idx",
633
871
  "columnNames": [
634
- "tenant_id",
635
- "organization_id"
872
+ "rule_id"
636
873
  ],
637
- "composite": true,
874
+ "composite": false,
638
875
  "constraint": false,
876
+ "keyName": "rule_set_members_rule_idx",
639
877
  "primary": false,
640
878
  "unique": false
641
879
  },
642
880
  {
643
- "keyName": "rule_sets_set_id_tenant_id_unique",
644
881
  "columnNames": [
645
- "set_id",
646
- "tenant_id"
882
+ "rule_set_id",
883
+ "rule_id"
647
884
  ],
648
885
  "composite": true,
649
886
  "constraint": true,
887
+ "keyName": "rule_set_members_rule_set_id_rule_id_unique",
650
888
  "primary": false,
651
889
  "unique": true
652
890
  },
653
891
  {
654
- "keyName": "rule_sets_pkey",
655
892
  "columnNames": [
656
- "id"
893
+ "rule_set_id",
894
+ "sequence"
657
895
  ],
658
- "composite": false,
659
- "constraint": true,
660
- "primary": true,
661
- "unique": true
896
+ "composite": true,
897
+ "constraint": false,
898
+ "keyName": "rule_set_members_set_idx",
899
+ "primary": false,
900
+ "unique": false
901
+ },
902
+ {
903
+ "columnNames": [
904
+ "tenant_id",
905
+ "organization_id"
906
+ ],
907
+ "composite": true,
908
+ "constraint": false,
909
+ "keyName": "rule_set_members_tenant_org_idx",
910
+ "primary": false,
911
+ "unique": false
662
912
  }
663
913
  ],
664
914
  "checks": [],
665
- "foreignKeys": {},
666
- "nativeEnums": {}
915
+ "foreignKeys": {
916
+ "rule_set_members_rule_id_foreign": {
917
+ "columnNames": [
918
+ "rule_id"
919
+ ],
920
+ "constraintName": "rule_set_members_rule_id_foreign",
921
+ "localTableName": "public.rule_set_members",
922
+ "referencedColumnNames": [
923
+ "id"
924
+ ],
925
+ "referencedTableName": "public.business_rules"
926
+ },
927
+ "rule_set_members_rule_set_id_foreign": {
928
+ "columnNames": [
929
+ "rule_set_id"
930
+ ],
931
+ "constraintName": "rule_set_members_rule_set_id_foreign",
932
+ "localTableName": "public.rule_set_members",
933
+ "referencedColumnNames": [
934
+ "id"
935
+ ],
936
+ "referencedTableName": "public.rule_sets"
937
+ }
938
+ },
939
+ "comment": null
667
940
  },
668
941
  {
942
+ "name": "rule_sets",
943
+ "schema": "public",
669
944
  "columns": {
670
- "id": {
671
- "name": "id",
672
- "type": "uuid",
945
+ "created_at": {
946
+ "name": "created_at",
947
+ "type": "timestamptz(6)",
673
948
  "unsigned": false,
674
949
  "autoincrement": false,
675
950
  "primary": false,
676
951
  "nullable": false,
677
- "default": "gen_random_uuid()",
678
- "mappedType": "uuid"
952
+ "unique": false,
953
+ "length": 6,
954
+ "precision": null,
955
+ "scale": null,
956
+ "default": null,
957
+ "comment": null,
958
+ "enumItems": [],
959
+ "mappedType": "datetime"
679
960
  },
680
- "rule_set_id": {
681
- "name": "rule_set_id",
682
- "type": "uuid",
961
+ "created_by": {
962
+ "name": "created_by",
963
+ "type": "varchar(50)",
683
964
  "unsigned": false,
684
965
  "autoincrement": false,
685
966
  "primary": false,
686
- "nullable": false,
687
- "mappedType": "uuid"
967
+ "nullable": true,
968
+ "unique": false,
969
+ "length": 50,
970
+ "precision": null,
971
+ "scale": null,
972
+ "default": null,
973
+ "comment": null,
974
+ "enumItems": [],
975
+ "mappedType": "string"
688
976
  },
689
- "rule_id": {
690
- "name": "rule_id",
691
- "type": "uuid",
977
+ "deleted_at": {
978
+ "name": "deleted_at",
979
+ "type": "timestamptz(6)",
692
980
  "unsigned": false,
693
981
  "autoincrement": false,
694
982
  "primary": false,
695
- "nullable": false,
696
- "mappedType": "uuid"
983
+ "nullable": true,
984
+ "unique": false,
985
+ "length": 6,
986
+ "precision": null,
987
+ "scale": null,
988
+ "default": null,
989
+ "comment": null,
990
+ "enumItems": [],
991
+ "mappedType": "datetime"
697
992
  },
698
- "sequence": {
699
- "name": "sequence",
700
- "type": "int",
993
+ "description": {
994
+ "name": "description",
995
+ "type": "text",
701
996
  "unsigned": false,
702
997
  "autoincrement": false,
703
998
  "primary": false,
704
- "nullable": false,
705
- "default": "0",
706
- "mappedType": "integer"
999
+ "nullable": true,
1000
+ "unique": false,
1001
+ "length": null,
1002
+ "precision": null,
1003
+ "scale": null,
1004
+ "default": null,
1005
+ "comment": null,
1006
+ "enumItems": [],
1007
+ "mappedType": "text"
707
1008
  },
708
1009
  "enabled": {
709
1010
  "name": "enabled",
@@ -712,16 +1013,29 @@
712
1013
  "autoincrement": false,
713
1014
  "primary": false,
714
1015
  "nullable": false,
1016
+ "unique": false,
1017
+ "length": null,
1018
+ "precision": null,
1019
+ "scale": null,
715
1020
  "default": "true",
1021
+ "comment": null,
1022
+ "enumItems": [],
716
1023
  "mappedType": "boolean"
717
1024
  },
718
- "tenant_id": {
719
- "name": "tenant_id",
1025
+ "id": {
1026
+ "name": "id",
720
1027
  "type": "uuid",
721
1028
  "unsigned": false,
722
1029
  "autoincrement": false,
723
- "primary": false,
1030
+ "primary": true,
724
1031
  "nullable": false,
1032
+ "unique": false,
1033
+ "length": null,
1034
+ "precision": null,
1035
+ "scale": null,
1036
+ "default": "gen_random_uuid()",
1037
+ "comment": null,
1038
+ "enumItems": [],
725
1039
  "mappedType": "uuid"
726
1040
  },
727
1041
  "organization_id": {
@@ -731,107 +1045,145 @@
731
1045
  "autoincrement": false,
732
1046
  "primary": false,
733
1047
  "nullable": false,
1048
+ "unique": false,
1049
+ "length": null,
1050
+ "precision": null,
1051
+ "scale": null,
1052
+ "default": null,
1053
+ "comment": null,
1054
+ "enumItems": [],
734
1055
  "mappedType": "uuid"
735
1056
  },
736
- "created_at": {
737
- "name": "created_at",
738
- "type": "timestamptz",
1057
+ "set_id": {
1058
+ "name": "set_id",
1059
+ "type": "varchar(50)",
1060
+ "unsigned": false,
1061
+ "autoincrement": false,
1062
+ "primary": false,
1063
+ "nullable": false,
1064
+ "unique": true,
1065
+ "length": 50,
1066
+ "precision": null,
1067
+ "scale": null,
1068
+ "default": null,
1069
+ "comment": null,
1070
+ "enumItems": [],
1071
+ "mappedType": "string"
1072
+ },
1073
+ "set_name": {
1074
+ "name": "set_name",
1075
+ "type": "varchar(200)",
1076
+ "unsigned": false,
1077
+ "autoincrement": false,
1078
+ "primary": false,
1079
+ "nullable": false,
1080
+ "unique": false,
1081
+ "length": 200,
1082
+ "precision": null,
1083
+ "scale": null,
1084
+ "default": null,
1085
+ "comment": null,
1086
+ "enumItems": [],
1087
+ "mappedType": "string"
1088
+ },
1089
+ "tenant_id": {
1090
+ "name": "tenant_id",
1091
+ "type": "uuid",
739
1092
  "unsigned": false,
740
1093
  "autoincrement": false,
741
1094
  "primary": false,
742
1095
  "nullable": false,
1096
+ "unique": false,
1097
+ "length": null,
1098
+ "precision": null,
1099
+ "scale": null,
1100
+ "default": null,
1101
+ "comment": null,
1102
+ "enumItems": [],
1103
+ "mappedType": "uuid"
1104
+ },
1105
+ "updated_at": {
1106
+ "name": "updated_at",
1107
+ "type": "timestamptz(6)",
1108
+ "unsigned": false,
1109
+ "autoincrement": false,
1110
+ "primary": false,
1111
+ "nullable": false,
1112
+ "unique": false,
743
1113
  "length": 6,
1114
+ "precision": null,
1115
+ "scale": null,
1116
+ "default": null,
1117
+ "comment": null,
1118
+ "enumItems": [],
744
1119
  "mappedType": "datetime"
1120
+ },
1121
+ "updated_by": {
1122
+ "name": "updated_by",
1123
+ "type": "varchar(50)",
1124
+ "unsigned": false,
1125
+ "autoincrement": false,
1126
+ "primary": false,
1127
+ "nullable": true,
1128
+ "unique": false,
1129
+ "length": 50,
1130
+ "precision": null,
1131
+ "scale": null,
1132
+ "default": null,
1133
+ "comment": null,
1134
+ "enumItems": [],
1135
+ "mappedType": "string"
745
1136
  }
746
1137
  },
747
- "name": "rule_set_members",
748
- "schema": "public",
749
1138
  "indexes": [
750
1139
  {
751
- "keyName": "rule_set_members_tenant_org_idx",
752
- "columnNames": [
753
- "tenant_id",
754
- "organization_id"
755
- ],
756
- "composite": true,
757
- "constraint": false,
758
- "primary": false,
759
- "unique": false
760
- },
761
- {
762
- "keyName": "rule_set_members_rule_idx",
763
1140
  "columnNames": [
764
- "rule_id"
1141
+ "enabled"
765
1142
  ],
766
1143
  "composite": false,
767
1144
  "constraint": false,
1145
+ "keyName": "rule_sets_enabled_idx",
768
1146
  "primary": false,
769
1147
  "unique": false
770
1148
  },
771
1149
  {
772
- "keyName": "rule_set_members_set_idx",
773
1150
  "columnNames": [
774
- "rule_set_id",
775
- "sequence"
1151
+ "id"
776
1152
  ],
777
- "composite": true,
778
- "constraint": false,
779
- "primary": false,
780
- "unique": false
1153
+ "composite": false,
1154
+ "constraint": true,
1155
+ "keyName": "rule_sets_pkey",
1156
+ "primary": true,
1157
+ "unique": true
781
1158
  },
782
1159
  {
783
- "keyName": "rule_set_members_rule_set_id_rule_id_unique",
784
1160
  "columnNames": [
785
- "rule_set_id",
786
- "rule_id"
1161
+ "set_id",
1162
+ "tenant_id"
787
1163
  ],
788
1164
  "composite": true,
789
1165
  "constraint": true,
1166
+ "keyName": "rule_sets_set_id_tenant_id_unique",
790
1167
  "primary": false,
791
1168
  "unique": true
792
1169
  },
793
1170
  {
794
- "keyName": "rule_set_members_pkey",
795
1171
  "columnNames": [
796
- "id"
1172
+ "tenant_id",
1173
+ "organization_id"
797
1174
  ],
798
- "composite": false,
799
- "constraint": true,
800
- "primary": true,
801
- "unique": true
1175
+ "composite": true,
1176
+ "constraint": false,
1177
+ "keyName": "rule_sets_tenant_org_idx",
1178
+ "primary": false,
1179
+ "unique": false
802
1180
  }
803
1181
  ],
804
1182
  "checks": [],
805
- "foreignKeys": {
806
- "rule_set_members_rule_set_id_foreign": {
807
- "constraintName": "rule_set_members_rule_set_id_foreign",
808
- "columnNames": [
809
- "rule_set_id"
810
- ],
811
- "localTableName": "public.rule_set_members",
812
- "referencedColumnNames": [
813
- "id"
814
- ],
815
- "referencedTableName": "public.rule_sets",
816
- "createForeignKeyConstraint": true,
817
- "updateRule": "cascade"
818
- },
819
- "rule_set_members_rule_id_foreign": {
820
- "constraintName": "rule_set_members_rule_id_foreign",
821
- "columnNames": [
822
- "rule_id"
823
- ],
824
- "localTableName": "public.rule_set_members",
825
- "referencedColumnNames": [
826
- "id"
827
- ],
828
- "referencedTableName": "public.business_rules",
829
- "createForeignKeyConstraint": true,
830
- "updateRule": "cascade"
831
- }
832
- },
833
- "nativeEnums": {}
1183
+ "foreignKeys": {},
1184
+ "comment": null
834
1185
  }
835
1186
  ],
1187
+ "views": [],
836
1188
  "nativeEnums": {}
837
- }
1189
+ }