@happyvertical/smrt-human-resources 0.0.0-stage → 0.53.6

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 (64) hide show
  1. package/AGENTS.md +297 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +291 -2
  5. package/dist/__smrt-register__.d.ts +2 -0
  6. package/dist/__smrt-register__.d.ts.map +1 -0
  7. package/dist/dates.d.ts +25 -0
  8. package/dist/dates.d.ts.map +1 -0
  9. package/dist/employment/index.d.ts +3 -0
  10. package/dist/employment/index.d.ts.map +1 -0
  11. package/dist/employment/models.d.ts +73 -0
  12. package/dist/employment/models.d.ts.map +1 -0
  13. package/dist/employment/queries.d.ts +12 -0
  14. package/dist/employment/queries.d.ts.map +1 -0
  15. package/dist/employment/service.d.ts +277 -0
  16. package/dist/employment/service.d.ts.map +1 -0
  17. package/dist/index.d.ts +18 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +2068 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/manifest.json +2424 -0
  22. package/dist/qualifications/index.d.ts +3 -0
  23. package/dist/qualifications/index.d.ts.map +1 -0
  24. package/dist/qualifications/internal.d.ts +24 -0
  25. package/dist/qualifications/internal.d.ts.map +1 -0
  26. package/dist/qualifications/models.d.ts +77 -0
  27. package/dist/qualifications/models.d.ts.map +1 -0
  28. package/dist/qualifications/service.d.ts +381 -0
  29. package/dist/qualifications/service.d.ts.map +1 -0
  30. package/dist/service-base.d.ts +47 -0
  31. package/dist/service-base.d.ts.map +1 -0
  32. package/dist/smrt-knowledge.json +902 -0
  33. package/dist/svelte/components/EmployeeForm.svelte +369 -0
  34. package/dist/svelte/components/EmployeeForm.svelte.d.ts +28 -0
  35. package/dist/svelte/components/EmployeeForm.svelte.d.ts.map +1 -0
  36. package/dist/svelte/components/EmployeeList.svelte +158 -0
  37. package/dist/svelte/components/EmployeeList.svelte.d.ts +13 -0
  38. package/dist/svelte/components/EmployeeList.svelte.d.ts.map +1 -0
  39. package/dist/svelte/components/ExpiringQualificationsList.svelte +126 -0
  40. package/dist/svelte/components/ExpiringQualificationsList.svelte.d.ts +13 -0
  41. package/dist/svelte/components/ExpiringQualificationsList.svelte.d.ts.map +1 -0
  42. package/dist/svelte/components/PersonQualifications.svelte +156 -0
  43. package/dist/svelte/components/PersonQualifications.svelte.d.ts +15 -0
  44. package/dist/svelte/components/PersonQualifications.svelte.d.ts.map +1 -0
  45. package/dist/svelte/i18n.d.ts +67 -0
  46. package/dist/svelte/i18n.d.ts.map +1 -0
  47. package/dist/svelte/i18n.js +67 -0
  48. package/dist/svelte/index.d.ts +23 -0
  49. package/dist/svelte/index.d.ts.map +1 -0
  50. package/dist/svelte/index.js +25 -0
  51. package/dist/svelte/types.d.ts +225 -0
  52. package/dist/svelte/types.d.ts.map +1 -0
  53. package/dist/svelte/types.js +257 -0
  54. package/dist/types.d.ts +119 -0
  55. package/dist/types.d.ts.map +1 -0
  56. package/dist/types.js +23 -0
  57. package/dist/types.js.map +1 -0
  58. package/dist/ui.d.ts +17 -0
  59. package/dist/ui.d.ts.map +1 -0
  60. package/dist/ui.js +65 -0
  61. package/dist/ui.js.map +1 -0
  62. package/dist/write.d.ts +22 -0
  63. package/dist/write.d.ts.map +1 -0
  64. package/package.json +86 -3
@@ -0,0 +1,2424 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 0,
4
+ "packageName": "@happyvertical/smrt-human-resources",
5
+ "packageVersion": "0.53.6",
6
+ "objects": {
7
+ "@happyvertical/smrt-human-resources:Employment": {
8
+ "name": "employment",
9
+ "className": "Employment",
10
+ "qualifiedName": "@happyvertical/smrt-human-resources:Employment",
11
+ "collection": "employments",
12
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts",
13
+ "packageName": "@happyvertical/smrt-human-resources",
14
+ "fields": {
15
+ "tenantId": {
16
+ "type": "text",
17
+ "required": true,
18
+ "_meta": {
19
+ "sqlType": "UUID",
20
+ "__tenancy": {
21
+ "isTenantIdField": true,
22
+ "autoFilter": true,
23
+ "required": true,
24
+ "autoPopulate": true,
25
+ "nullable": false,
26
+ "mode": "required",
27
+ "field": "tenantId",
28
+ "allowSuperAdminBypass": false
29
+ }
30
+ }
31
+ },
32
+ "profileId": {
33
+ "type": "crossPackageRef",
34
+ "required": false,
35
+ "related": "@happyvertical/smrt-profiles:Profile",
36
+ "_meta": {
37
+ "onDelete": "RESTRICT"
38
+ }
39
+ },
40
+ "userId": {
41
+ "type": "crossPackageRef",
42
+ "required": false,
43
+ "related": "@happyvertical/smrt-users:User",
44
+ "_meta": {
45
+ "nullable": true
46
+ }
47
+ },
48
+ "employerProfileId": {
49
+ "type": "crossPackageRef",
50
+ "required": false,
51
+ "related": "@happyvertical/smrt-profiles:Profile",
52
+ "_meta": {
53
+ "nullable": true,
54
+ "onDelete": "RESTRICT"
55
+ }
56
+ },
57
+ "employeeNumber": {
58
+ "type": "text",
59
+ "required": false
60
+ },
61
+ "workerType": {
62
+ "type": "text",
63
+ "required": false,
64
+ "_meta": {}
65
+ },
66
+ "position": {
67
+ "type": "text",
68
+ "required": false,
69
+ "_meta": {
70
+ "nullable": true
71
+ }
72
+ },
73
+ "status": {
74
+ "type": "text",
75
+ "required": false,
76
+ "_meta": {}
77
+ }
78
+ },
79
+ "methods": {
80
+ "save": {
81
+ "name": "save",
82
+ "async": true,
83
+ "parameters": [],
84
+ "returnType": "Promise<this>",
85
+ "isStatic": false,
86
+ "isPublic": true
87
+ },
88
+ "delete": {
89
+ "name": "delete",
90
+ "async": true,
91
+ "parameters": [],
92
+ "returnType": "Promise<void>",
93
+ "isStatic": false,
94
+ "isPublic": true
95
+ }
96
+ },
97
+ "decoratorConfig": {
98
+ "tableName": "employments",
99
+ "sensitive": true,
100
+ "conflictColumns": [
101
+ "tenant_id",
102
+ "employee_number"
103
+ ],
104
+ "indexes": [
105
+ {
106
+ "name": "employments_tenant_profile_uq",
107
+ "columns": [
108
+ "tenantId",
109
+ "profileId"
110
+ ],
111
+ "unique": true
112
+ },
113
+ {
114
+ "name": "employments_tenant_user_idx",
115
+ "columns": [
116
+ "tenantId",
117
+ "userId"
118
+ ]
119
+ }
120
+ ],
121
+ "api": {
122
+ "include": []
123
+ },
124
+ "cli": {
125
+ "include": []
126
+ },
127
+ "mcp": {
128
+ "include": []
129
+ },
130
+ "tenantScoped": {
131
+ "mode": "required"
132
+ }
133
+ },
134
+ "extends": "SmrtObject",
135
+ "exportName": "Employment",
136
+ "collectionExportName": "EmploymentCollection",
137
+ "validationRules": [],
138
+ "schema": {
139
+ "tableName": "employments",
140
+ "ddl": "CREATE TABLE IF NOT EXISTS \"employments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"profile_id\" UUID,\n \"user_id\" UUID,\n \"employer_profile_id\" UUID,\n \"employee_number\" TEXT,\n \"worker_type\" TEXT,\n \"position\" TEXT,\n \"status\" TEXT\n);",
141
+ "columns": {
142
+ "id": {
143
+ "type": "UUID",
144
+ "primaryKey": true,
145
+ "referenceKind": "id",
146
+ "notNull": true
147
+ },
148
+ "slug": {
149
+ "type": "TEXT",
150
+ "notNull": true
151
+ },
152
+ "context": {
153
+ "type": "TEXT",
154
+ "notNull": true,
155
+ "default": ""
156
+ },
157
+ "created_at": {
158
+ "type": "TIMESTAMP",
159
+ "notNull": true,
160
+ "default": "current_timestamp"
161
+ },
162
+ "updated_at": {
163
+ "type": "TIMESTAMP",
164
+ "notNull": true,
165
+ "default": "current_timestamp"
166
+ },
167
+ "tenant_id": {
168
+ "type": "UUID",
169
+ "referenceKind": "tenantId",
170
+ "notNull": true,
171
+ "unique": false
172
+ },
173
+ "profile_id": {
174
+ "type": "UUID",
175
+ "referenceKind": "crossPackageRef",
176
+ "notNull": false,
177
+ "unique": false
178
+ },
179
+ "user_id": {
180
+ "type": "UUID",
181
+ "referenceKind": "crossPackageRef",
182
+ "notNull": false,
183
+ "unique": false
184
+ },
185
+ "employer_profile_id": {
186
+ "type": "UUID",
187
+ "referenceKind": "crossPackageRef",
188
+ "notNull": false,
189
+ "unique": false
190
+ },
191
+ "employee_number": {
192
+ "type": "TEXT",
193
+ "notNull": false,
194
+ "unique": false
195
+ },
196
+ "worker_type": {
197
+ "type": "TEXT",
198
+ "notNull": false,
199
+ "unique": false
200
+ },
201
+ "position": {
202
+ "type": "TEXT",
203
+ "notNull": false,
204
+ "unique": false
205
+ },
206
+ "status": {
207
+ "type": "TEXT",
208
+ "notNull": false,
209
+ "unique": false
210
+ }
211
+ },
212
+ "indexes": [
213
+ {
214
+ "name": "employments_tenant_id_employee_number_idx",
215
+ "columns": [
216
+ "tenant_id",
217
+ "employee_number"
218
+ ],
219
+ "unique": true,
220
+ "nullsNotDistinct": true
221
+ },
222
+ {
223
+ "name": "employments_slug_context_idx",
224
+ "columns": [
225
+ "slug",
226
+ "context"
227
+ ]
228
+ },
229
+ {
230
+ "name": "employments_tenant_profile_uq",
231
+ "columns": [
232
+ "tenant_id",
233
+ "profile_id"
234
+ ],
235
+ "unique": true
236
+ },
237
+ {
238
+ "name": "employments_tenant_user_idx",
239
+ "columns": [
240
+ "tenant_id",
241
+ "user_id"
242
+ ]
243
+ },
244
+ {
245
+ "name": "employments_tenant_id_created_at_idx",
246
+ "columns": [
247
+ "tenant_id",
248
+ "created_at"
249
+ ]
250
+ },
251
+ {
252
+ "name": "employments_profile_id_idx",
253
+ "columns": [
254
+ "profile_id"
255
+ ]
256
+ },
257
+ {
258
+ "name": "employments_user_id_idx",
259
+ "columns": [
260
+ "user_id"
261
+ ]
262
+ },
263
+ {
264
+ "name": "employments_employer_profile_id_idx",
265
+ "columns": [
266
+ "employer_profile_id"
267
+ ]
268
+ }
269
+ ],
270
+ "version": "ff7ef7a8"
271
+ },
272
+ "importPath": "@happyvertical/smrt-human-resources"
273
+ },
274
+ "@happyvertical/smrt-human-resources:EmploymentTerm": {
275
+ "name": "employmentterm",
276
+ "className": "EmploymentTerm",
277
+ "qualifiedName": "@happyvertical/smrt-human-resources:EmploymentTerm",
278
+ "collection": "employmentterms",
279
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts",
280
+ "packageName": "@happyvertical/smrt-human-resources",
281
+ "fields": {
282
+ "tenantId": {
283
+ "type": "text",
284
+ "required": true,
285
+ "_meta": {
286
+ "sqlType": "UUID",
287
+ "__tenancy": {
288
+ "isTenantIdField": true,
289
+ "autoFilter": true,
290
+ "required": true,
291
+ "autoPopulate": true,
292
+ "nullable": false,
293
+ "mode": "required",
294
+ "field": "tenantId",
295
+ "allowSuperAdminBypass": false
296
+ }
297
+ }
298
+ },
299
+ "employmentId": {
300
+ "type": "foreignKey",
301
+ "required": false,
302
+ "related": "Employment",
303
+ "_meta": {
304
+ "onDelete": "RESTRICT"
305
+ }
306
+ },
307
+ "startedOn": {
308
+ "type": "text",
309
+ "required": false,
310
+ "_meta": {}
311
+ },
312
+ "endedOn": {
313
+ "type": "text",
314
+ "required": false,
315
+ "_meta": {
316
+ "nullable": true
317
+ }
318
+ },
319
+ "endReason": {
320
+ "type": "text",
321
+ "required": false
322
+ }
323
+ },
324
+ "methods": {
325
+ "save": {
326
+ "name": "save",
327
+ "async": true,
328
+ "parameters": [],
329
+ "returnType": "Promise<this>",
330
+ "isStatic": false,
331
+ "isPublic": true
332
+ },
333
+ "delete": {
334
+ "name": "delete",
335
+ "async": true,
336
+ "parameters": [],
337
+ "returnType": "Promise<void>",
338
+ "isStatic": false,
339
+ "isPublic": true
340
+ }
341
+ },
342
+ "decoratorConfig": {
343
+ "tableName": "employment_terms",
344
+ "sensitive": true,
345
+ "indexes": [
346
+ {
347
+ "name": "employment_terms_employment_idx",
348
+ "columns": [
349
+ "tenantId",
350
+ "employmentId",
351
+ "startedOn"
352
+ ]
353
+ }
354
+ ],
355
+ "api": {
356
+ "include": []
357
+ },
358
+ "cli": {
359
+ "include": []
360
+ },
361
+ "mcp": {
362
+ "include": []
363
+ },
364
+ "tenantScoped": {
365
+ "mode": "required"
366
+ },
367
+ "conflictColumns": [
368
+ "tenant_id",
369
+ "slug",
370
+ "context"
371
+ ]
372
+ },
373
+ "extends": "SmrtObject",
374
+ "exportName": "EmploymentTerm",
375
+ "collectionExportName": "EmploymentTermCollection",
376
+ "validationRules": [],
377
+ "schema": {
378
+ "tableName": "employment_terms",
379
+ "ddl": "CREATE TABLE IF NOT EXISTS \"employment_terms\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"employment_id\" UUID,\n \"started_on\" TEXT,\n \"ended_on\" TEXT,\n \"end_reason\" TEXT\n);",
380
+ "columns": {
381
+ "id": {
382
+ "type": "UUID",
383
+ "primaryKey": true,
384
+ "referenceKind": "id",
385
+ "notNull": true
386
+ },
387
+ "slug": {
388
+ "type": "TEXT",
389
+ "notNull": true
390
+ },
391
+ "context": {
392
+ "type": "TEXT",
393
+ "notNull": true,
394
+ "default": ""
395
+ },
396
+ "created_at": {
397
+ "type": "TIMESTAMP",
398
+ "notNull": true,
399
+ "default": "current_timestamp"
400
+ },
401
+ "updated_at": {
402
+ "type": "TIMESTAMP",
403
+ "notNull": true,
404
+ "default": "current_timestamp"
405
+ },
406
+ "tenant_id": {
407
+ "type": "UUID",
408
+ "referenceKind": "tenantId",
409
+ "notNull": true,
410
+ "unique": false
411
+ },
412
+ "employment_id": {
413
+ "type": "UUID",
414
+ "referenceKind": "foreignKey",
415
+ "notNull": false,
416
+ "unique": false,
417
+ "foreignKey": {
418
+ "table": "employments",
419
+ "column": "id",
420
+ "onDelete": "RESTRICT",
421
+ "onUpdate": "CASCADE"
422
+ }
423
+ },
424
+ "started_on": {
425
+ "type": "TEXT",
426
+ "notNull": false,
427
+ "unique": false
428
+ },
429
+ "ended_on": {
430
+ "type": "TEXT",
431
+ "notNull": false,
432
+ "unique": false
433
+ },
434
+ "end_reason": {
435
+ "type": "TEXT",
436
+ "notNull": false,
437
+ "unique": false
438
+ }
439
+ },
440
+ "indexes": [
441
+ {
442
+ "name": "employment_terms_slug_context_idx",
443
+ "columns": [
444
+ "tenant_id",
445
+ "slug",
446
+ "context"
447
+ ],
448
+ "unique": true
449
+ },
450
+ {
451
+ "name": "employment_terms_employment_idx",
452
+ "columns": [
453
+ "tenant_id",
454
+ "employment_id",
455
+ "started_on"
456
+ ]
457
+ },
458
+ {
459
+ "name": "employment_terms_tenant_id_created_at_idx",
460
+ "columns": [
461
+ "tenant_id",
462
+ "created_at"
463
+ ]
464
+ },
465
+ {
466
+ "name": "employment_terms_employment_id_idx",
467
+ "columns": [
468
+ "employment_id"
469
+ ]
470
+ }
471
+ ],
472
+ "version": "165d209b"
473
+ },
474
+ "importPath": "@happyvertical/smrt-human-resources"
475
+ },
476
+ "@happyvertical/smrt-human-resources:EmploymentChange": {
477
+ "name": "employmentchange",
478
+ "className": "EmploymentChange",
479
+ "qualifiedName": "@happyvertical/smrt-human-resources:EmploymentChange",
480
+ "collection": "employmentchanges",
481
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts",
482
+ "packageName": "@happyvertical/smrt-human-resources",
483
+ "fields": {
484
+ "tenantId": {
485
+ "type": "text",
486
+ "required": true,
487
+ "_meta": {
488
+ "sqlType": "UUID",
489
+ "__tenancy": {
490
+ "isTenantIdField": true,
491
+ "autoFilter": true,
492
+ "required": true,
493
+ "autoPopulate": true,
494
+ "nullable": false,
495
+ "mode": "required",
496
+ "field": "tenantId",
497
+ "allowSuperAdminBypass": false
498
+ }
499
+ }
500
+ },
501
+ "employmentId": {
502
+ "type": "foreignKey",
503
+ "required": false,
504
+ "related": "Employment",
505
+ "_meta": {
506
+ "onDelete": "RESTRICT"
507
+ }
508
+ },
509
+ "kind": {
510
+ "type": "text",
511
+ "required": false,
512
+ "_meta": {}
513
+ },
514
+ "effectiveOn": {
515
+ "type": "text",
516
+ "required": false,
517
+ "_meta": {}
518
+ },
519
+ "fromValue": {
520
+ "type": "text",
521
+ "required": false,
522
+ "_meta": {
523
+ "nullable": true
524
+ }
525
+ },
526
+ "toValue": {
527
+ "type": "text",
528
+ "required": false,
529
+ "_meta": {
530
+ "nullable": true
531
+ }
532
+ },
533
+ "note": {
534
+ "type": "text",
535
+ "required": false
536
+ },
537
+ "actorProfileId": {
538
+ "type": "crossPackageRef",
539
+ "required": false,
540
+ "related": "@happyvertical/smrt-profiles:Profile",
541
+ "_meta": {
542
+ "onDelete": "RESTRICT"
543
+ }
544
+ }
545
+ },
546
+ "methods": {
547
+ "save": {
548
+ "name": "save",
549
+ "async": true,
550
+ "parameters": [],
551
+ "returnType": "Promise<this>",
552
+ "isStatic": false,
553
+ "isPublic": true
554
+ },
555
+ "delete": {
556
+ "name": "delete",
557
+ "async": true,
558
+ "parameters": [],
559
+ "returnType": "Promise<void>",
560
+ "isStatic": false,
561
+ "isPublic": true
562
+ }
563
+ },
564
+ "decoratorConfig": {
565
+ "tableName": "employment_changes",
566
+ "sensitive": true,
567
+ "indexes": [
568
+ {
569
+ "name": "employment_changes_employment_idx",
570
+ "columns": [
571
+ "tenantId",
572
+ "employmentId",
573
+ "effectiveOn"
574
+ ]
575
+ }
576
+ ],
577
+ "api": {
578
+ "include": []
579
+ },
580
+ "cli": {
581
+ "include": []
582
+ },
583
+ "mcp": {
584
+ "include": []
585
+ },
586
+ "tenantScoped": {
587
+ "mode": "required"
588
+ },
589
+ "conflictColumns": [
590
+ "tenant_id",
591
+ "slug",
592
+ "context"
593
+ ]
594
+ },
595
+ "extends": "SmrtObject",
596
+ "exportName": "EmploymentChange",
597
+ "collectionExportName": "EmploymentChangeCollection",
598
+ "validationRules": [],
599
+ "schema": {
600
+ "tableName": "employment_changes",
601
+ "ddl": "CREATE TABLE IF NOT EXISTS \"employment_changes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"employment_id\" UUID,\n \"kind\" TEXT,\n \"effective_on\" TEXT,\n \"from_value\" TEXT,\n \"to_value\" TEXT,\n \"note\" TEXT,\n \"actor_profile_id\" UUID\n);",
602
+ "columns": {
603
+ "id": {
604
+ "type": "UUID",
605
+ "primaryKey": true,
606
+ "referenceKind": "id",
607
+ "notNull": true
608
+ },
609
+ "slug": {
610
+ "type": "TEXT",
611
+ "notNull": true
612
+ },
613
+ "context": {
614
+ "type": "TEXT",
615
+ "notNull": true,
616
+ "default": ""
617
+ },
618
+ "created_at": {
619
+ "type": "TIMESTAMP",
620
+ "notNull": true,
621
+ "default": "current_timestamp"
622
+ },
623
+ "updated_at": {
624
+ "type": "TIMESTAMP",
625
+ "notNull": true,
626
+ "default": "current_timestamp"
627
+ },
628
+ "tenant_id": {
629
+ "type": "UUID",
630
+ "referenceKind": "tenantId",
631
+ "notNull": true,
632
+ "unique": false
633
+ },
634
+ "employment_id": {
635
+ "type": "UUID",
636
+ "referenceKind": "foreignKey",
637
+ "notNull": false,
638
+ "unique": false,
639
+ "foreignKey": {
640
+ "table": "employments",
641
+ "column": "id",
642
+ "onDelete": "RESTRICT",
643
+ "onUpdate": "CASCADE"
644
+ }
645
+ },
646
+ "kind": {
647
+ "type": "TEXT",
648
+ "notNull": false,
649
+ "unique": false
650
+ },
651
+ "effective_on": {
652
+ "type": "TEXT",
653
+ "notNull": false,
654
+ "unique": false
655
+ },
656
+ "from_value": {
657
+ "type": "TEXT",
658
+ "notNull": false,
659
+ "unique": false
660
+ },
661
+ "to_value": {
662
+ "type": "TEXT",
663
+ "notNull": false,
664
+ "unique": false
665
+ },
666
+ "note": {
667
+ "type": "TEXT",
668
+ "notNull": false,
669
+ "unique": false
670
+ },
671
+ "actor_profile_id": {
672
+ "type": "UUID",
673
+ "referenceKind": "crossPackageRef",
674
+ "notNull": false,
675
+ "unique": false
676
+ }
677
+ },
678
+ "indexes": [
679
+ {
680
+ "name": "employment_changes_slug_context_idx",
681
+ "columns": [
682
+ "tenant_id",
683
+ "slug",
684
+ "context"
685
+ ],
686
+ "unique": true
687
+ },
688
+ {
689
+ "name": "employment_changes_employment_idx",
690
+ "columns": [
691
+ "tenant_id",
692
+ "employment_id",
693
+ "effective_on"
694
+ ]
695
+ },
696
+ {
697
+ "name": "employment_changes_tenant_id_created_at_idx",
698
+ "columns": [
699
+ "tenant_id",
700
+ "created_at"
701
+ ]
702
+ },
703
+ {
704
+ "name": "employment_changes_employment_id_idx",
705
+ "columns": [
706
+ "employment_id"
707
+ ]
708
+ },
709
+ {
710
+ "name": "employment_changes_actor_profile_id_idx",
711
+ "columns": [
712
+ "actor_profile_id"
713
+ ]
714
+ }
715
+ ],
716
+ "version": "5d93422f"
717
+ },
718
+ "importPath": "@happyvertical/smrt-human-resources"
719
+ },
720
+ "@happyvertical/smrt-human-resources:EmploymentCollection": {
721
+ "name": "employmentcollection",
722
+ "className": "EmploymentCollection",
723
+ "qualifiedName": "@happyvertical/smrt-human-resources:EmploymentCollection",
724
+ "collection": "employments",
725
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts",
726
+ "packageName": "@happyvertical/smrt-human-resources",
727
+ "fields": {},
728
+ "methods": {},
729
+ "decoratorConfig": {
730
+ "api": {
731
+ "include": []
732
+ },
733
+ "mcp": {
734
+ "include": []
735
+ },
736
+ "cli": false,
737
+ "tableName": "employments"
738
+ },
739
+ "extends": "SmrtCollection",
740
+ "extendsTypeArg": "Employment",
741
+ "exportName": "EmploymentCollection",
742
+ "collectionExportName": "EmploymentCollectionCollection",
743
+ "schema": {
744
+ "tableName": "employments",
745
+ "ddl": "CREATE TABLE IF NOT EXISTS \"employments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"profile_id\" UUID,\n \"user_id\" UUID,\n \"employer_profile_id\" UUID,\n \"employee_number\" TEXT,\n \"worker_type\" TEXT,\n \"position\" TEXT,\n \"status\" TEXT\n);",
746
+ "columns": {
747
+ "id": {
748
+ "type": "UUID",
749
+ "primaryKey": true,
750
+ "referenceKind": "id",
751
+ "notNull": true
752
+ },
753
+ "slug": {
754
+ "type": "TEXT",
755
+ "notNull": true
756
+ },
757
+ "context": {
758
+ "type": "TEXT",
759
+ "notNull": true,
760
+ "default": ""
761
+ },
762
+ "created_at": {
763
+ "type": "TIMESTAMP",
764
+ "notNull": true,
765
+ "default": "current_timestamp"
766
+ },
767
+ "updated_at": {
768
+ "type": "TIMESTAMP",
769
+ "notNull": true,
770
+ "default": "current_timestamp"
771
+ },
772
+ "tenant_id": {
773
+ "type": "UUID",
774
+ "referenceKind": "tenantId",
775
+ "notNull": true,
776
+ "unique": false
777
+ },
778
+ "profile_id": {
779
+ "type": "UUID",
780
+ "referenceKind": "crossPackageRef",
781
+ "notNull": false,
782
+ "unique": false
783
+ },
784
+ "user_id": {
785
+ "type": "UUID",
786
+ "referenceKind": "crossPackageRef",
787
+ "notNull": false,
788
+ "unique": false
789
+ },
790
+ "employer_profile_id": {
791
+ "type": "UUID",
792
+ "referenceKind": "crossPackageRef",
793
+ "notNull": false,
794
+ "unique": false
795
+ },
796
+ "employee_number": {
797
+ "type": "TEXT",
798
+ "notNull": false,
799
+ "unique": false
800
+ },
801
+ "worker_type": {
802
+ "type": "TEXT",
803
+ "notNull": false,
804
+ "unique": false
805
+ },
806
+ "position": {
807
+ "type": "TEXT",
808
+ "notNull": false,
809
+ "unique": false
810
+ },
811
+ "status": {
812
+ "type": "TEXT",
813
+ "notNull": false,
814
+ "unique": false
815
+ }
816
+ },
817
+ "indexes": [
818
+ {
819
+ "name": "employments_tenant_id_employee_number_idx",
820
+ "columns": [
821
+ "tenant_id",
822
+ "employee_number"
823
+ ],
824
+ "unique": true,
825
+ "nullsNotDistinct": true
826
+ },
827
+ {
828
+ "name": "employments_slug_context_idx",
829
+ "columns": [
830
+ "slug",
831
+ "context"
832
+ ]
833
+ },
834
+ {
835
+ "name": "employments_tenant_profile_uq",
836
+ "columns": [
837
+ "tenant_id",
838
+ "profile_id"
839
+ ],
840
+ "unique": true
841
+ },
842
+ {
843
+ "name": "employments_tenant_user_idx",
844
+ "columns": [
845
+ "tenant_id",
846
+ "user_id"
847
+ ]
848
+ },
849
+ {
850
+ "name": "employments_tenant_id_created_at_idx",
851
+ "columns": [
852
+ "tenant_id",
853
+ "created_at"
854
+ ]
855
+ },
856
+ {
857
+ "name": "employments_profile_id_idx",
858
+ "columns": [
859
+ "profile_id"
860
+ ]
861
+ },
862
+ {
863
+ "name": "employments_user_id_idx",
864
+ "columns": [
865
+ "user_id"
866
+ ]
867
+ },
868
+ {
869
+ "name": "employments_employer_profile_id_idx",
870
+ "columns": [
871
+ "employer_profile_id"
872
+ ]
873
+ }
874
+ ],
875
+ "version": "ff7ef7a8"
876
+ },
877
+ "importPath": "@happyvertical/smrt-human-resources"
878
+ },
879
+ "@happyvertical/smrt-human-resources:EmploymentTermCollection": {
880
+ "name": "employmenttermcollection",
881
+ "className": "EmploymentTermCollection",
882
+ "qualifiedName": "@happyvertical/smrt-human-resources:EmploymentTermCollection",
883
+ "collection": "employmentterms",
884
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts",
885
+ "packageName": "@happyvertical/smrt-human-resources",
886
+ "fields": {},
887
+ "methods": {},
888
+ "decoratorConfig": {
889
+ "api": {
890
+ "include": []
891
+ },
892
+ "mcp": {
893
+ "include": []
894
+ },
895
+ "cli": false,
896
+ "tableName": "employment_terms"
897
+ },
898
+ "extends": "SmrtCollection",
899
+ "extendsTypeArg": "EmploymentTerm",
900
+ "exportName": "EmploymentTermCollection",
901
+ "collectionExportName": "EmploymentTermCollectionCollection",
902
+ "schema": {
903
+ "tableName": "employment_terms",
904
+ "ddl": "CREATE TABLE IF NOT EXISTS \"employment_terms\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"employment_id\" UUID,\n \"started_on\" TEXT,\n \"ended_on\" TEXT,\n \"end_reason\" TEXT\n);",
905
+ "columns": {
906
+ "id": {
907
+ "type": "UUID",
908
+ "primaryKey": true,
909
+ "referenceKind": "id",
910
+ "notNull": true
911
+ },
912
+ "slug": {
913
+ "type": "TEXT",
914
+ "notNull": true
915
+ },
916
+ "context": {
917
+ "type": "TEXT",
918
+ "notNull": true,
919
+ "default": ""
920
+ },
921
+ "created_at": {
922
+ "type": "TIMESTAMP",
923
+ "notNull": true,
924
+ "default": "current_timestamp"
925
+ },
926
+ "updated_at": {
927
+ "type": "TIMESTAMP",
928
+ "notNull": true,
929
+ "default": "current_timestamp"
930
+ },
931
+ "tenant_id": {
932
+ "type": "UUID",
933
+ "referenceKind": "tenantId",
934
+ "notNull": true,
935
+ "unique": false
936
+ },
937
+ "employment_id": {
938
+ "type": "UUID",
939
+ "referenceKind": "foreignKey",
940
+ "notNull": false,
941
+ "unique": false,
942
+ "foreignKey": {
943
+ "table": "employments",
944
+ "column": "id",
945
+ "onDelete": "RESTRICT",
946
+ "onUpdate": "CASCADE"
947
+ }
948
+ },
949
+ "started_on": {
950
+ "type": "TEXT",
951
+ "notNull": false,
952
+ "unique": false
953
+ },
954
+ "ended_on": {
955
+ "type": "TEXT",
956
+ "notNull": false,
957
+ "unique": false
958
+ },
959
+ "end_reason": {
960
+ "type": "TEXT",
961
+ "notNull": false,
962
+ "unique": false
963
+ }
964
+ },
965
+ "indexes": [
966
+ {
967
+ "name": "employment_terms_slug_context_idx",
968
+ "columns": [
969
+ "tenant_id",
970
+ "slug",
971
+ "context"
972
+ ],
973
+ "unique": true
974
+ },
975
+ {
976
+ "name": "employment_terms_employment_idx",
977
+ "columns": [
978
+ "tenant_id",
979
+ "employment_id",
980
+ "started_on"
981
+ ]
982
+ },
983
+ {
984
+ "name": "employment_terms_tenant_id_created_at_idx",
985
+ "columns": [
986
+ "tenant_id",
987
+ "created_at"
988
+ ]
989
+ },
990
+ {
991
+ "name": "employment_terms_employment_id_idx",
992
+ "columns": [
993
+ "employment_id"
994
+ ]
995
+ }
996
+ ],
997
+ "version": "165d209b"
998
+ },
999
+ "importPath": "@happyvertical/smrt-human-resources"
1000
+ },
1001
+ "@happyvertical/smrt-human-resources:EmploymentChangeCollection": {
1002
+ "name": "employmentchangecollection",
1003
+ "className": "EmploymentChangeCollection",
1004
+ "qualifiedName": "@happyvertical/smrt-human-resources:EmploymentChangeCollection",
1005
+ "collection": "employmentchanges",
1006
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts",
1007
+ "packageName": "@happyvertical/smrt-human-resources",
1008
+ "fields": {},
1009
+ "methods": {},
1010
+ "decoratorConfig": {
1011
+ "api": {
1012
+ "include": []
1013
+ },
1014
+ "mcp": {
1015
+ "include": []
1016
+ },
1017
+ "cli": false,
1018
+ "tableName": "employment_changes"
1019
+ },
1020
+ "extends": "SmrtCollection",
1021
+ "extendsTypeArg": "EmploymentChange",
1022
+ "exportName": "EmploymentChangeCollection",
1023
+ "collectionExportName": "EmploymentChangeCollectionCollection",
1024
+ "schema": {
1025
+ "tableName": "employment_changes",
1026
+ "ddl": "CREATE TABLE IF NOT EXISTS \"employment_changes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"employment_id\" UUID,\n \"kind\" TEXT,\n \"effective_on\" TEXT,\n \"from_value\" TEXT,\n \"to_value\" TEXT,\n \"note\" TEXT,\n \"actor_profile_id\" UUID\n);",
1027
+ "columns": {
1028
+ "id": {
1029
+ "type": "UUID",
1030
+ "primaryKey": true,
1031
+ "referenceKind": "id",
1032
+ "notNull": true
1033
+ },
1034
+ "slug": {
1035
+ "type": "TEXT",
1036
+ "notNull": true
1037
+ },
1038
+ "context": {
1039
+ "type": "TEXT",
1040
+ "notNull": true,
1041
+ "default": ""
1042
+ },
1043
+ "created_at": {
1044
+ "type": "TIMESTAMP",
1045
+ "notNull": true,
1046
+ "default": "current_timestamp"
1047
+ },
1048
+ "updated_at": {
1049
+ "type": "TIMESTAMP",
1050
+ "notNull": true,
1051
+ "default": "current_timestamp"
1052
+ },
1053
+ "tenant_id": {
1054
+ "type": "UUID",
1055
+ "referenceKind": "tenantId",
1056
+ "notNull": true,
1057
+ "unique": false
1058
+ },
1059
+ "employment_id": {
1060
+ "type": "UUID",
1061
+ "referenceKind": "foreignKey",
1062
+ "notNull": false,
1063
+ "unique": false,
1064
+ "foreignKey": {
1065
+ "table": "employments",
1066
+ "column": "id",
1067
+ "onDelete": "RESTRICT",
1068
+ "onUpdate": "CASCADE"
1069
+ }
1070
+ },
1071
+ "kind": {
1072
+ "type": "TEXT",
1073
+ "notNull": false,
1074
+ "unique": false
1075
+ },
1076
+ "effective_on": {
1077
+ "type": "TEXT",
1078
+ "notNull": false,
1079
+ "unique": false
1080
+ },
1081
+ "from_value": {
1082
+ "type": "TEXT",
1083
+ "notNull": false,
1084
+ "unique": false
1085
+ },
1086
+ "to_value": {
1087
+ "type": "TEXT",
1088
+ "notNull": false,
1089
+ "unique": false
1090
+ },
1091
+ "note": {
1092
+ "type": "TEXT",
1093
+ "notNull": false,
1094
+ "unique": false
1095
+ },
1096
+ "actor_profile_id": {
1097
+ "type": "UUID",
1098
+ "referenceKind": "crossPackageRef",
1099
+ "notNull": false,
1100
+ "unique": false
1101
+ }
1102
+ },
1103
+ "indexes": [
1104
+ {
1105
+ "name": "employment_changes_slug_context_idx",
1106
+ "columns": [
1107
+ "tenant_id",
1108
+ "slug",
1109
+ "context"
1110
+ ],
1111
+ "unique": true
1112
+ },
1113
+ {
1114
+ "name": "employment_changes_employment_idx",
1115
+ "columns": [
1116
+ "tenant_id",
1117
+ "employment_id",
1118
+ "effective_on"
1119
+ ]
1120
+ },
1121
+ {
1122
+ "name": "employment_changes_tenant_id_created_at_idx",
1123
+ "columns": [
1124
+ "tenant_id",
1125
+ "created_at"
1126
+ ]
1127
+ },
1128
+ {
1129
+ "name": "employment_changes_employment_id_idx",
1130
+ "columns": [
1131
+ "employment_id"
1132
+ ]
1133
+ },
1134
+ {
1135
+ "name": "employment_changes_actor_profile_id_idx",
1136
+ "columns": [
1137
+ "actor_profile_id"
1138
+ ]
1139
+ }
1140
+ ],
1141
+ "version": "5d93422f"
1142
+ },
1143
+ "importPath": "@happyvertical/smrt-human-resources"
1144
+ },
1145
+ "@happyvertical/smrt-human-resources:Qualification": {
1146
+ "name": "qualification",
1147
+ "className": "Qualification",
1148
+ "qualifiedName": "@happyvertical/smrt-human-resources:Qualification",
1149
+ "collection": "qualifications",
1150
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts",
1151
+ "packageName": "@happyvertical/smrt-human-resources",
1152
+ "fields": {
1153
+ "tenantId": {
1154
+ "type": "text",
1155
+ "required": true,
1156
+ "_meta": {
1157
+ "sqlType": "UUID",
1158
+ "__tenancy": {
1159
+ "isTenantIdField": true,
1160
+ "autoFilter": true,
1161
+ "required": true,
1162
+ "autoPopulate": true,
1163
+ "nullable": false,
1164
+ "mode": "required",
1165
+ "field": "tenantId",
1166
+ "allowSuperAdminBypass": false
1167
+ }
1168
+ }
1169
+ },
1170
+ "key": {
1171
+ "type": "text",
1172
+ "required": false
1173
+ },
1174
+ "name": {
1175
+ "type": "text",
1176
+ "required": false
1177
+ },
1178
+ "kind": {
1179
+ "type": "text",
1180
+ "required": false,
1181
+ "_meta": {}
1182
+ },
1183
+ "issuingBody": {
1184
+ "type": "text",
1185
+ "required": false
1186
+ },
1187
+ "expires": {
1188
+ "type": "boolean",
1189
+ "required": true,
1190
+ "default": false
1191
+ },
1192
+ "validityMonths": {
1193
+ "type": "integer",
1194
+ "required": false,
1195
+ "_meta": {
1196
+ "nullable": true
1197
+ }
1198
+ },
1199
+ "scope": {
1200
+ "type": "text",
1201
+ "required": false,
1202
+ "_meta": {}
1203
+ },
1204
+ "isActive": {
1205
+ "type": "boolean",
1206
+ "required": true,
1207
+ "default": true
1208
+ }
1209
+ },
1210
+ "methods": {
1211
+ "save": {
1212
+ "name": "save",
1213
+ "async": true,
1214
+ "parameters": [],
1215
+ "returnType": "Promise<this>",
1216
+ "isStatic": false,
1217
+ "isPublic": true
1218
+ },
1219
+ "delete": {
1220
+ "name": "delete",
1221
+ "async": true,
1222
+ "parameters": [],
1223
+ "returnType": "Promise<void>",
1224
+ "isStatic": false,
1225
+ "isPublic": true
1226
+ }
1227
+ },
1228
+ "decoratorConfig": {
1229
+ "tableName": "qualifications",
1230
+ "sensitive": true,
1231
+ "conflictColumns": [
1232
+ "tenant_id",
1233
+ "key"
1234
+ ],
1235
+ "api": {
1236
+ "include": []
1237
+ },
1238
+ "cli": {
1239
+ "include": []
1240
+ },
1241
+ "mcp": {
1242
+ "include": []
1243
+ },
1244
+ "tenantScoped": {
1245
+ "mode": "required"
1246
+ }
1247
+ },
1248
+ "extends": "SmrtObject",
1249
+ "exportName": "Qualification",
1250
+ "collectionExportName": "QualificationCollection",
1251
+ "validationRules": [
1252
+ {
1253
+ "field": "expires",
1254
+ "rule": "required",
1255
+ "fieldType": "boolean"
1256
+ },
1257
+ {
1258
+ "field": "isActive",
1259
+ "rule": "required",
1260
+ "fieldType": "boolean"
1261
+ }
1262
+ ],
1263
+ "schema": {
1264
+ "tableName": "qualifications",
1265
+ "ddl": "CREATE TABLE IF NOT EXISTS \"qualifications\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"key\" TEXT,\n \"name\" TEXT,\n \"kind\" TEXT,\n \"issuing_body\" TEXT,\n \"expires\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"validity_months\" INTEGER,\n \"scope\" TEXT,\n \"is_active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
1266
+ "columns": {
1267
+ "id": {
1268
+ "type": "UUID",
1269
+ "primaryKey": true,
1270
+ "referenceKind": "id",
1271
+ "notNull": true
1272
+ },
1273
+ "slug": {
1274
+ "type": "TEXT",
1275
+ "notNull": true
1276
+ },
1277
+ "context": {
1278
+ "type": "TEXT",
1279
+ "notNull": true,
1280
+ "default": ""
1281
+ },
1282
+ "created_at": {
1283
+ "type": "TIMESTAMP",
1284
+ "notNull": true,
1285
+ "default": "current_timestamp"
1286
+ },
1287
+ "updated_at": {
1288
+ "type": "TIMESTAMP",
1289
+ "notNull": true,
1290
+ "default": "current_timestamp"
1291
+ },
1292
+ "tenant_id": {
1293
+ "type": "UUID",
1294
+ "referenceKind": "tenantId",
1295
+ "notNull": true,
1296
+ "unique": false
1297
+ },
1298
+ "key": {
1299
+ "type": "TEXT",
1300
+ "notNull": false,
1301
+ "unique": false
1302
+ },
1303
+ "name": {
1304
+ "type": "TEXT",
1305
+ "notNull": false,
1306
+ "unique": false
1307
+ },
1308
+ "kind": {
1309
+ "type": "TEXT",
1310
+ "notNull": false,
1311
+ "unique": false
1312
+ },
1313
+ "issuing_body": {
1314
+ "type": "TEXT",
1315
+ "notNull": false,
1316
+ "unique": false
1317
+ },
1318
+ "expires": {
1319
+ "type": "BOOLEAN",
1320
+ "notNull": true,
1321
+ "unique": false,
1322
+ "default": false
1323
+ },
1324
+ "validity_months": {
1325
+ "type": "INTEGER",
1326
+ "notNull": false,
1327
+ "unique": false
1328
+ },
1329
+ "scope": {
1330
+ "type": "TEXT",
1331
+ "notNull": false,
1332
+ "unique": false
1333
+ },
1334
+ "is_active": {
1335
+ "type": "BOOLEAN",
1336
+ "notNull": true,
1337
+ "unique": false,
1338
+ "default": true
1339
+ }
1340
+ },
1341
+ "indexes": [
1342
+ {
1343
+ "name": "qualifications_tenant_id_key_idx",
1344
+ "columns": [
1345
+ "tenant_id",
1346
+ "key"
1347
+ ],
1348
+ "unique": true,
1349
+ "nullsNotDistinct": true
1350
+ },
1351
+ {
1352
+ "name": "qualifications_slug_context_idx",
1353
+ "columns": [
1354
+ "slug",
1355
+ "context"
1356
+ ]
1357
+ },
1358
+ {
1359
+ "name": "qualifications_tenant_id_created_at_idx",
1360
+ "columns": [
1361
+ "tenant_id",
1362
+ "created_at"
1363
+ ]
1364
+ }
1365
+ ],
1366
+ "version": "c9fa3721"
1367
+ },
1368
+ "importPath": "@happyvertical/smrt-human-resources"
1369
+ },
1370
+ "@happyvertical/smrt-human-resources:HeldQualification": {
1371
+ "name": "heldqualification",
1372
+ "className": "HeldQualification",
1373
+ "qualifiedName": "@happyvertical/smrt-human-resources:HeldQualification",
1374
+ "collection": "heldqualifications",
1375
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts",
1376
+ "packageName": "@happyvertical/smrt-human-resources",
1377
+ "fields": {
1378
+ "tenantId": {
1379
+ "type": "text",
1380
+ "required": true,
1381
+ "_meta": {
1382
+ "sqlType": "UUID",
1383
+ "__tenancy": {
1384
+ "isTenantIdField": true,
1385
+ "autoFilter": true,
1386
+ "required": true,
1387
+ "autoPopulate": true,
1388
+ "nullable": false,
1389
+ "mode": "required",
1390
+ "field": "tenantId",
1391
+ "allowSuperAdminBypass": false
1392
+ }
1393
+ }
1394
+ },
1395
+ "qualificationId": {
1396
+ "type": "foreignKey",
1397
+ "required": false,
1398
+ "related": "Qualification",
1399
+ "_meta": {
1400
+ "onDelete": "RESTRICT"
1401
+ }
1402
+ },
1403
+ "profileId": {
1404
+ "type": "crossPackageRef",
1405
+ "required": false,
1406
+ "related": "@happyvertical/smrt-profiles:Profile",
1407
+ "_meta": {
1408
+ "onDelete": "RESTRICT"
1409
+ }
1410
+ },
1411
+ "employmentId": {
1412
+ "type": "foreignKey",
1413
+ "required": false,
1414
+ "related": "Employment",
1415
+ "_meta": {
1416
+ "nullable": true,
1417
+ "onDelete": "RESTRICT"
1418
+ }
1419
+ },
1420
+ "issuedOn": {
1421
+ "type": "text",
1422
+ "required": false,
1423
+ "_meta": {}
1424
+ },
1425
+ "expiresOn": {
1426
+ "type": "text",
1427
+ "required": false,
1428
+ "_meta": {
1429
+ "nullable": true
1430
+ }
1431
+ },
1432
+ "certificateNumber": {
1433
+ "type": "text",
1434
+ "required": false
1435
+ },
1436
+ "status": {
1437
+ "type": "text",
1438
+ "required": false,
1439
+ "_meta": {}
1440
+ },
1441
+ "verifiedByProfileId": {
1442
+ "type": "crossPackageRef",
1443
+ "required": false,
1444
+ "related": "@happyvertical/smrt-profiles:Profile",
1445
+ "_meta": {
1446
+ "nullable": true,
1447
+ "onDelete": "RESTRICT"
1448
+ }
1449
+ },
1450
+ "verifiedAt": {
1451
+ "type": "datetime",
1452
+ "required": false
1453
+ },
1454
+ "documentAssetId": {
1455
+ "type": "crossPackageRef",
1456
+ "required": false,
1457
+ "related": "@happyvertical/smrt-assets:Asset",
1458
+ "_meta": {
1459
+ "nullable": true
1460
+ }
1461
+ },
1462
+ "renewalOfId": {
1463
+ "type": "foreignKey",
1464
+ "required": false,
1465
+ "related": "HeldQualification",
1466
+ "_meta": {
1467
+ "nullable": true,
1468
+ "onDelete": "RESTRICT"
1469
+ }
1470
+ }
1471
+ },
1472
+ "methods": {
1473
+ "save": {
1474
+ "name": "save",
1475
+ "async": true,
1476
+ "parameters": [],
1477
+ "returnType": "Promise<this>",
1478
+ "isStatic": false,
1479
+ "isPublic": true
1480
+ },
1481
+ "delete": {
1482
+ "name": "delete",
1483
+ "async": true,
1484
+ "parameters": [],
1485
+ "returnType": "Promise<void>",
1486
+ "isStatic": false,
1487
+ "isPublic": true
1488
+ }
1489
+ },
1490
+ "decoratorConfig": {
1491
+ "tableName": "held_qualifications",
1492
+ "sensitive": true,
1493
+ "indexes": [
1494
+ {
1495
+ "name": "held_qualifications_profile_idx",
1496
+ "columns": [
1497
+ "tenantId",
1498
+ "profileId",
1499
+ "qualificationId"
1500
+ ]
1501
+ },
1502
+ {
1503
+ "name": "held_qualifications_expiry_idx",
1504
+ "columns": [
1505
+ "tenantId",
1506
+ "status",
1507
+ "expiresOn"
1508
+ ]
1509
+ }
1510
+ ],
1511
+ "api": {
1512
+ "include": []
1513
+ },
1514
+ "cli": {
1515
+ "include": []
1516
+ },
1517
+ "mcp": {
1518
+ "include": []
1519
+ },
1520
+ "tenantScoped": {
1521
+ "mode": "required"
1522
+ },
1523
+ "conflictColumns": [
1524
+ "tenant_id",
1525
+ "slug",
1526
+ "context"
1527
+ ]
1528
+ },
1529
+ "extends": "SmrtObject",
1530
+ "exportName": "HeldQualification",
1531
+ "collectionExportName": "HeldQualificationCollection",
1532
+ "validationRules": [],
1533
+ "schema": {
1534
+ "tableName": "held_qualifications",
1535
+ "ddl": "CREATE TABLE IF NOT EXISTS \"held_qualifications\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"qualification_id\" UUID,\n \"profile_id\" UUID,\n \"employment_id\" UUID,\n \"issued_on\" TEXT,\n \"expires_on\" TEXT,\n \"certificate_number\" TEXT,\n \"status\" TEXT,\n \"verified_by_profile_id\" UUID,\n \"verified_at\" TIMESTAMP,\n \"document_asset_id\" UUID,\n \"renewal_of_id\" UUID\n);",
1536
+ "columns": {
1537
+ "id": {
1538
+ "type": "UUID",
1539
+ "primaryKey": true,
1540
+ "referenceKind": "id",
1541
+ "notNull": true
1542
+ },
1543
+ "slug": {
1544
+ "type": "TEXT",
1545
+ "notNull": true
1546
+ },
1547
+ "context": {
1548
+ "type": "TEXT",
1549
+ "notNull": true,
1550
+ "default": ""
1551
+ },
1552
+ "created_at": {
1553
+ "type": "TIMESTAMP",
1554
+ "notNull": true,
1555
+ "default": "current_timestamp"
1556
+ },
1557
+ "updated_at": {
1558
+ "type": "TIMESTAMP",
1559
+ "notNull": true,
1560
+ "default": "current_timestamp"
1561
+ },
1562
+ "tenant_id": {
1563
+ "type": "UUID",
1564
+ "referenceKind": "tenantId",
1565
+ "notNull": true,
1566
+ "unique": false
1567
+ },
1568
+ "qualification_id": {
1569
+ "type": "UUID",
1570
+ "referenceKind": "foreignKey",
1571
+ "notNull": false,
1572
+ "unique": false,
1573
+ "foreignKey": {
1574
+ "table": "qualifications",
1575
+ "column": "id",
1576
+ "onDelete": "RESTRICT",
1577
+ "onUpdate": "CASCADE"
1578
+ }
1579
+ },
1580
+ "profile_id": {
1581
+ "type": "UUID",
1582
+ "referenceKind": "crossPackageRef",
1583
+ "notNull": false,
1584
+ "unique": false
1585
+ },
1586
+ "employment_id": {
1587
+ "type": "UUID",
1588
+ "referenceKind": "foreignKey",
1589
+ "notNull": false,
1590
+ "unique": false,
1591
+ "foreignKey": {
1592
+ "table": "employments",
1593
+ "column": "id",
1594
+ "onDelete": "RESTRICT",
1595
+ "onUpdate": "CASCADE"
1596
+ }
1597
+ },
1598
+ "issued_on": {
1599
+ "type": "TEXT",
1600
+ "notNull": false,
1601
+ "unique": false
1602
+ },
1603
+ "expires_on": {
1604
+ "type": "TEXT",
1605
+ "notNull": false,
1606
+ "unique": false
1607
+ },
1608
+ "certificate_number": {
1609
+ "type": "TEXT",
1610
+ "notNull": false,
1611
+ "unique": false
1612
+ },
1613
+ "status": {
1614
+ "type": "TEXT",
1615
+ "notNull": false,
1616
+ "unique": false
1617
+ },
1618
+ "verified_by_profile_id": {
1619
+ "type": "UUID",
1620
+ "referenceKind": "crossPackageRef",
1621
+ "notNull": false,
1622
+ "unique": false
1623
+ },
1624
+ "verified_at": {
1625
+ "type": "TIMESTAMP",
1626
+ "notNull": false,
1627
+ "unique": false
1628
+ },
1629
+ "document_asset_id": {
1630
+ "type": "UUID",
1631
+ "referenceKind": "crossPackageRef",
1632
+ "notNull": false,
1633
+ "unique": false
1634
+ },
1635
+ "renewal_of_id": {
1636
+ "type": "UUID",
1637
+ "referenceKind": "foreignKey",
1638
+ "notNull": false,
1639
+ "unique": false,
1640
+ "foreignKey": {
1641
+ "table": "held_qualifications",
1642
+ "column": "id",
1643
+ "onDelete": "RESTRICT",
1644
+ "onUpdate": "CASCADE"
1645
+ }
1646
+ }
1647
+ },
1648
+ "indexes": [
1649
+ {
1650
+ "name": "held_qualifications_slug_context_idx",
1651
+ "columns": [
1652
+ "tenant_id",
1653
+ "slug",
1654
+ "context"
1655
+ ],
1656
+ "unique": true
1657
+ },
1658
+ {
1659
+ "name": "held_qualifications_profile_idx",
1660
+ "columns": [
1661
+ "tenant_id",
1662
+ "profile_id",
1663
+ "qualification_id"
1664
+ ]
1665
+ },
1666
+ {
1667
+ "name": "held_qualifications_expiry_idx",
1668
+ "columns": [
1669
+ "tenant_id",
1670
+ "status",
1671
+ "expires_on"
1672
+ ]
1673
+ },
1674
+ {
1675
+ "name": "held_qualifications_tenant_id_created_at_idx",
1676
+ "columns": [
1677
+ "tenant_id",
1678
+ "created_at"
1679
+ ]
1680
+ },
1681
+ {
1682
+ "name": "held_qualifications_qualification_id_idx",
1683
+ "columns": [
1684
+ "qualification_id"
1685
+ ]
1686
+ },
1687
+ {
1688
+ "name": "held_qualifications_profile_id_idx",
1689
+ "columns": [
1690
+ "profile_id"
1691
+ ]
1692
+ },
1693
+ {
1694
+ "name": "held_qualifications_employment_id_idx",
1695
+ "columns": [
1696
+ "employment_id"
1697
+ ]
1698
+ },
1699
+ {
1700
+ "name": "held_qualifications_verified_by_profile_id_idx",
1701
+ "columns": [
1702
+ "verified_by_profile_id"
1703
+ ]
1704
+ },
1705
+ {
1706
+ "name": "held_qualifications_document_asset_id_idx",
1707
+ "columns": [
1708
+ "document_asset_id"
1709
+ ]
1710
+ },
1711
+ {
1712
+ "name": "held_qualifications_renewal_of_id_idx",
1713
+ "columns": [
1714
+ "renewal_of_id"
1715
+ ]
1716
+ }
1717
+ ],
1718
+ "version": "fafbe37f"
1719
+ },
1720
+ "importPath": "@happyvertical/smrt-human-resources"
1721
+ },
1722
+ "@happyvertical/smrt-human-resources:HeldQualificationChange": {
1723
+ "name": "heldqualificationchange",
1724
+ "className": "HeldQualificationChange",
1725
+ "qualifiedName": "@happyvertical/smrt-human-resources:HeldQualificationChange",
1726
+ "collection": "heldqualificationchanges",
1727
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts",
1728
+ "packageName": "@happyvertical/smrt-human-resources",
1729
+ "fields": {
1730
+ "tenantId": {
1731
+ "type": "text",
1732
+ "required": true,
1733
+ "_meta": {
1734
+ "sqlType": "UUID",
1735
+ "__tenancy": {
1736
+ "isTenantIdField": true,
1737
+ "autoFilter": true,
1738
+ "required": true,
1739
+ "autoPopulate": true,
1740
+ "nullable": false,
1741
+ "mode": "required",
1742
+ "field": "tenantId",
1743
+ "allowSuperAdminBypass": false
1744
+ }
1745
+ }
1746
+ },
1747
+ "heldQualificationId": {
1748
+ "type": "foreignKey",
1749
+ "required": false,
1750
+ "related": "HeldQualification",
1751
+ "_meta": {
1752
+ "onDelete": "RESTRICT"
1753
+ }
1754
+ },
1755
+ "kind": {
1756
+ "type": "text",
1757
+ "required": false,
1758
+ "_meta": {}
1759
+ },
1760
+ "effectiveOn": {
1761
+ "type": "text",
1762
+ "required": false,
1763
+ "_meta": {}
1764
+ },
1765
+ "reason": {
1766
+ "type": "text",
1767
+ "required": false
1768
+ },
1769
+ "actorProfileId": {
1770
+ "type": "crossPackageRef",
1771
+ "required": false,
1772
+ "related": "@happyvertical/smrt-profiles:Profile",
1773
+ "_meta": {
1774
+ "onDelete": "RESTRICT"
1775
+ }
1776
+ }
1777
+ },
1778
+ "methods": {
1779
+ "save": {
1780
+ "name": "save",
1781
+ "async": true,
1782
+ "parameters": [],
1783
+ "returnType": "Promise<this>",
1784
+ "isStatic": false,
1785
+ "isPublic": true
1786
+ },
1787
+ "delete": {
1788
+ "name": "delete",
1789
+ "async": true,
1790
+ "parameters": [],
1791
+ "returnType": "Promise<void>",
1792
+ "isStatic": false,
1793
+ "isPublic": true
1794
+ }
1795
+ },
1796
+ "decoratorConfig": {
1797
+ "tableName": "held_qualification_changes",
1798
+ "sensitive": true,
1799
+ "indexes": [
1800
+ {
1801
+ "name": "held_qualification_changes_held_idx",
1802
+ "columns": [
1803
+ "tenantId",
1804
+ "heldQualificationId",
1805
+ "effectiveOn"
1806
+ ]
1807
+ }
1808
+ ],
1809
+ "api": {
1810
+ "include": []
1811
+ },
1812
+ "cli": {
1813
+ "include": []
1814
+ },
1815
+ "mcp": {
1816
+ "include": []
1817
+ },
1818
+ "tenantScoped": {
1819
+ "mode": "required"
1820
+ },
1821
+ "conflictColumns": [
1822
+ "tenant_id",
1823
+ "slug",
1824
+ "context"
1825
+ ]
1826
+ },
1827
+ "extends": "SmrtObject",
1828
+ "exportName": "HeldQualificationChange",
1829
+ "collectionExportName": "HeldQualificationChangeCollection",
1830
+ "validationRules": [],
1831
+ "schema": {
1832
+ "tableName": "held_qualification_changes",
1833
+ "ddl": "CREATE TABLE IF NOT EXISTS \"held_qualification_changes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"held_qualification_id\" UUID,\n \"kind\" TEXT,\n \"effective_on\" TEXT,\n \"reason\" TEXT,\n \"actor_profile_id\" UUID\n);",
1834
+ "columns": {
1835
+ "id": {
1836
+ "type": "UUID",
1837
+ "primaryKey": true,
1838
+ "referenceKind": "id",
1839
+ "notNull": true
1840
+ },
1841
+ "slug": {
1842
+ "type": "TEXT",
1843
+ "notNull": true
1844
+ },
1845
+ "context": {
1846
+ "type": "TEXT",
1847
+ "notNull": true,
1848
+ "default": ""
1849
+ },
1850
+ "created_at": {
1851
+ "type": "TIMESTAMP",
1852
+ "notNull": true,
1853
+ "default": "current_timestamp"
1854
+ },
1855
+ "updated_at": {
1856
+ "type": "TIMESTAMP",
1857
+ "notNull": true,
1858
+ "default": "current_timestamp"
1859
+ },
1860
+ "tenant_id": {
1861
+ "type": "UUID",
1862
+ "referenceKind": "tenantId",
1863
+ "notNull": true,
1864
+ "unique": false
1865
+ },
1866
+ "held_qualification_id": {
1867
+ "type": "UUID",
1868
+ "referenceKind": "foreignKey",
1869
+ "notNull": false,
1870
+ "unique": false,
1871
+ "foreignKey": {
1872
+ "table": "held_qualifications",
1873
+ "column": "id",
1874
+ "onDelete": "RESTRICT",
1875
+ "onUpdate": "CASCADE"
1876
+ }
1877
+ },
1878
+ "kind": {
1879
+ "type": "TEXT",
1880
+ "notNull": false,
1881
+ "unique": false
1882
+ },
1883
+ "effective_on": {
1884
+ "type": "TEXT",
1885
+ "notNull": false,
1886
+ "unique": false
1887
+ },
1888
+ "reason": {
1889
+ "type": "TEXT",
1890
+ "notNull": false,
1891
+ "unique": false
1892
+ },
1893
+ "actor_profile_id": {
1894
+ "type": "UUID",
1895
+ "referenceKind": "crossPackageRef",
1896
+ "notNull": false,
1897
+ "unique": false
1898
+ }
1899
+ },
1900
+ "indexes": [
1901
+ {
1902
+ "name": "held_qualification_changes_slug_context_idx",
1903
+ "columns": [
1904
+ "tenant_id",
1905
+ "slug",
1906
+ "context"
1907
+ ],
1908
+ "unique": true
1909
+ },
1910
+ {
1911
+ "name": "held_qualification_changes_held_idx",
1912
+ "columns": [
1913
+ "tenant_id",
1914
+ "held_qualification_id",
1915
+ "effective_on"
1916
+ ]
1917
+ },
1918
+ {
1919
+ "name": "held_qualification_changes_tenant_id_created_at_idx",
1920
+ "columns": [
1921
+ "tenant_id",
1922
+ "created_at"
1923
+ ]
1924
+ },
1925
+ {
1926
+ "name": "held_qualification_changes_held_qualification_id_idx",
1927
+ "columns": [
1928
+ "held_qualification_id"
1929
+ ]
1930
+ },
1931
+ {
1932
+ "name": "held_qualification_changes_actor_profile_id_idx",
1933
+ "columns": [
1934
+ "actor_profile_id"
1935
+ ]
1936
+ }
1937
+ ],
1938
+ "version": "ed9ed5e1"
1939
+ },
1940
+ "importPath": "@happyvertical/smrt-human-resources"
1941
+ },
1942
+ "@happyvertical/smrt-human-resources:QualificationCollection": {
1943
+ "name": "qualificationcollection",
1944
+ "className": "QualificationCollection",
1945
+ "qualifiedName": "@happyvertical/smrt-human-resources:QualificationCollection",
1946
+ "collection": "qualifications",
1947
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts",
1948
+ "packageName": "@happyvertical/smrt-human-resources",
1949
+ "fields": {},
1950
+ "methods": {},
1951
+ "decoratorConfig": {
1952
+ "api": {
1953
+ "include": []
1954
+ },
1955
+ "mcp": {
1956
+ "include": []
1957
+ },
1958
+ "cli": false,
1959
+ "tableName": "qualifications"
1960
+ },
1961
+ "extends": "SmrtCollection",
1962
+ "extendsTypeArg": "Qualification",
1963
+ "exportName": "QualificationCollection",
1964
+ "collectionExportName": "QualificationCollectionCollection",
1965
+ "schema": {
1966
+ "tableName": "qualifications",
1967
+ "ddl": "CREATE TABLE IF NOT EXISTS \"qualifications\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"key\" TEXT,\n \"name\" TEXT,\n \"kind\" TEXT,\n \"issuing_body\" TEXT,\n \"expires\" BOOLEAN NOT NULL DEFAULT FALSE,\n \"validity_months\" INTEGER,\n \"scope\" TEXT,\n \"is_active\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
1968
+ "columns": {
1969
+ "id": {
1970
+ "type": "UUID",
1971
+ "primaryKey": true,
1972
+ "referenceKind": "id",
1973
+ "notNull": true
1974
+ },
1975
+ "slug": {
1976
+ "type": "TEXT",
1977
+ "notNull": true
1978
+ },
1979
+ "context": {
1980
+ "type": "TEXT",
1981
+ "notNull": true,
1982
+ "default": ""
1983
+ },
1984
+ "created_at": {
1985
+ "type": "TIMESTAMP",
1986
+ "notNull": true,
1987
+ "default": "current_timestamp"
1988
+ },
1989
+ "updated_at": {
1990
+ "type": "TIMESTAMP",
1991
+ "notNull": true,
1992
+ "default": "current_timestamp"
1993
+ },
1994
+ "tenant_id": {
1995
+ "type": "UUID",
1996
+ "referenceKind": "tenantId",
1997
+ "notNull": true,
1998
+ "unique": false
1999
+ },
2000
+ "key": {
2001
+ "type": "TEXT",
2002
+ "notNull": false,
2003
+ "unique": false
2004
+ },
2005
+ "name": {
2006
+ "type": "TEXT",
2007
+ "notNull": false,
2008
+ "unique": false
2009
+ },
2010
+ "kind": {
2011
+ "type": "TEXT",
2012
+ "notNull": false,
2013
+ "unique": false
2014
+ },
2015
+ "issuing_body": {
2016
+ "type": "TEXT",
2017
+ "notNull": false,
2018
+ "unique": false
2019
+ },
2020
+ "expires": {
2021
+ "type": "BOOLEAN",
2022
+ "notNull": true,
2023
+ "unique": false,
2024
+ "default": false
2025
+ },
2026
+ "validity_months": {
2027
+ "type": "INTEGER",
2028
+ "notNull": false,
2029
+ "unique": false
2030
+ },
2031
+ "scope": {
2032
+ "type": "TEXT",
2033
+ "notNull": false,
2034
+ "unique": false
2035
+ },
2036
+ "is_active": {
2037
+ "type": "BOOLEAN",
2038
+ "notNull": true,
2039
+ "unique": false,
2040
+ "default": true
2041
+ }
2042
+ },
2043
+ "indexes": [
2044
+ {
2045
+ "name": "qualifications_tenant_id_key_idx",
2046
+ "columns": [
2047
+ "tenant_id",
2048
+ "key"
2049
+ ],
2050
+ "unique": true,
2051
+ "nullsNotDistinct": true
2052
+ },
2053
+ {
2054
+ "name": "qualifications_slug_context_idx",
2055
+ "columns": [
2056
+ "slug",
2057
+ "context"
2058
+ ]
2059
+ },
2060
+ {
2061
+ "name": "qualifications_tenant_id_created_at_idx",
2062
+ "columns": [
2063
+ "tenant_id",
2064
+ "created_at"
2065
+ ]
2066
+ }
2067
+ ],
2068
+ "version": "c9fa3721"
2069
+ },
2070
+ "importPath": "@happyvertical/smrt-human-resources"
2071
+ },
2072
+ "@happyvertical/smrt-human-resources:HeldQualificationCollection": {
2073
+ "name": "heldqualificationcollection",
2074
+ "className": "HeldQualificationCollection",
2075
+ "qualifiedName": "@happyvertical/smrt-human-resources:HeldQualificationCollection",
2076
+ "collection": "heldqualifications",
2077
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts",
2078
+ "packageName": "@happyvertical/smrt-human-resources",
2079
+ "fields": {},
2080
+ "methods": {},
2081
+ "decoratorConfig": {
2082
+ "api": {
2083
+ "include": []
2084
+ },
2085
+ "mcp": {
2086
+ "include": []
2087
+ },
2088
+ "cli": false,
2089
+ "tableName": "held_qualifications"
2090
+ },
2091
+ "extends": "SmrtCollection",
2092
+ "extendsTypeArg": "HeldQualification",
2093
+ "exportName": "HeldQualificationCollection",
2094
+ "collectionExportName": "HeldQualificationCollectionCollection",
2095
+ "schema": {
2096
+ "tableName": "held_qualifications",
2097
+ "ddl": "CREATE TABLE IF NOT EXISTS \"held_qualifications\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"qualification_id\" UUID,\n \"profile_id\" UUID,\n \"employment_id\" UUID,\n \"issued_on\" TEXT,\n \"expires_on\" TEXT,\n \"certificate_number\" TEXT,\n \"status\" TEXT,\n \"verified_by_profile_id\" UUID,\n \"verified_at\" TIMESTAMP,\n \"document_asset_id\" UUID,\n \"renewal_of_id\" UUID\n);",
2098
+ "columns": {
2099
+ "id": {
2100
+ "type": "UUID",
2101
+ "primaryKey": true,
2102
+ "referenceKind": "id",
2103
+ "notNull": true
2104
+ },
2105
+ "slug": {
2106
+ "type": "TEXT",
2107
+ "notNull": true
2108
+ },
2109
+ "context": {
2110
+ "type": "TEXT",
2111
+ "notNull": true,
2112
+ "default": ""
2113
+ },
2114
+ "created_at": {
2115
+ "type": "TIMESTAMP",
2116
+ "notNull": true,
2117
+ "default": "current_timestamp"
2118
+ },
2119
+ "updated_at": {
2120
+ "type": "TIMESTAMP",
2121
+ "notNull": true,
2122
+ "default": "current_timestamp"
2123
+ },
2124
+ "tenant_id": {
2125
+ "type": "UUID",
2126
+ "referenceKind": "tenantId",
2127
+ "notNull": true,
2128
+ "unique": false
2129
+ },
2130
+ "qualification_id": {
2131
+ "type": "UUID",
2132
+ "referenceKind": "foreignKey",
2133
+ "notNull": false,
2134
+ "unique": false,
2135
+ "foreignKey": {
2136
+ "table": "qualifications",
2137
+ "column": "id",
2138
+ "onDelete": "RESTRICT",
2139
+ "onUpdate": "CASCADE"
2140
+ }
2141
+ },
2142
+ "profile_id": {
2143
+ "type": "UUID",
2144
+ "referenceKind": "crossPackageRef",
2145
+ "notNull": false,
2146
+ "unique": false
2147
+ },
2148
+ "employment_id": {
2149
+ "type": "UUID",
2150
+ "referenceKind": "foreignKey",
2151
+ "notNull": false,
2152
+ "unique": false,
2153
+ "foreignKey": {
2154
+ "table": "employments",
2155
+ "column": "id",
2156
+ "onDelete": "RESTRICT",
2157
+ "onUpdate": "CASCADE"
2158
+ }
2159
+ },
2160
+ "issued_on": {
2161
+ "type": "TEXT",
2162
+ "notNull": false,
2163
+ "unique": false
2164
+ },
2165
+ "expires_on": {
2166
+ "type": "TEXT",
2167
+ "notNull": false,
2168
+ "unique": false
2169
+ },
2170
+ "certificate_number": {
2171
+ "type": "TEXT",
2172
+ "notNull": false,
2173
+ "unique": false
2174
+ },
2175
+ "status": {
2176
+ "type": "TEXT",
2177
+ "notNull": false,
2178
+ "unique": false
2179
+ },
2180
+ "verified_by_profile_id": {
2181
+ "type": "UUID",
2182
+ "referenceKind": "crossPackageRef",
2183
+ "notNull": false,
2184
+ "unique": false
2185
+ },
2186
+ "verified_at": {
2187
+ "type": "TIMESTAMP",
2188
+ "notNull": false,
2189
+ "unique": false
2190
+ },
2191
+ "document_asset_id": {
2192
+ "type": "UUID",
2193
+ "referenceKind": "crossPackageRef",
2194
+ "notNull": false,
2195
+ "unique": false
2196
+ },
2197
+ "renewal_of_id": {
2198
+ "type": "UUID",
2199
+ "referenceKind": "foreignKey",
2200
+ "notNull": false,
2201
+ "unique": false,
2202
+ "foreignKey": {
2203
+ "table": "held_qualifications",
2204
+ "column": "id",
2205
+ "onDelete": "RESTRICT",
2206
+ "onUpdate": "CASCADE"
2207
+ }
2208
+ }
2209
+ },
2210
+ "indexes": [
2211
+ {
2212
+ "name": "held_qualifications_slug_context_idx",
2213
+ "columns": [
2214
+ "tenant_id",
2215
+ "slug",
2216
+ "context"
2217
+ ],
2218
+ "unique": true
2219
+ },
2220
+ {
2221
+ "name": "held_qualifications_profile_idx",
2222
+ "columns": [
2223
+ "tenant_id",
2224
+ "profile_id",
2225
+ "qualification_id"
2226
+ ]
2227
+ },
2228
+ {
2229
+ "name": "held_qualifications_expiry_idx",
2230
+ "columns": [
2231
+ "tenant_id",
2232
+ "status",
2233
+ "expires_on"
2234
+ ]
2235
+ },
2236
+ {
2237
+ "name": "held_qualifications_tenant_id_created_at_idx",
2238
+ "columns": [
2239
+ "tenant_id",
2240
+ "created_at"
2241
+ ]
2242
+ },
2243
+ {
2244
+ "name": "held_qualifications_qualification_id_idx",
2245
+ "columns": [
2246
+ "qualification_id"
2247
+ ]
2248
+ },
2249
+ {
2250
+ "name": "held_qualifications_profile_id_idx",
2251
+ "columns": [
2252
+ "profile_id"
2253
+ ]
2254
+ },
2255
+ {
2256
+ "name": "held_qualifications_employment_id_idx",
2257
+ "columns": [
2258
+ "employment_id"
2259
+ ]
2260
+ },
2261
+ {
2262
+ "name": "held_qualifications_verified_by_profile_id_idx",
2263
+ "columns": [
2264
+ "verified_by_profile_id"
2265
+ ]
2266
+ },
2267
+ {
2268
+ "name": "held_qualifications_document_asset_id_idx",
2269
+ "columns": [
2270
+ "document_asset_id"
2271
+ ]
2272
+ },
2273
+ {
2274
+ "name": "held_qualifications_renewal_of_id_idx",
2275
+ "columns": [
2276
+ "renewal_of_id"
2277
+ ]
2278
+ }
2279
+ ],
2280
+ "version": "fafbe37f"
2281
+ },
2282
+ "importPath": "@happyvertical/smrt-human-resources"
2283
+ },
2284
+ "@happyvertical/smrt-human-resources:HeldQualificationChangeCollection": {
2285
+ "name": "heldqualificationchangecollection",
2286
+ "className": "HeldQualificationChangeCollection",
2287
+ "qualifiedName": "@happyvertical/smrt-human-resources:HeldQualificationChangeCollection",
2288
+ "collection": "heldqualificationchanges",
2289
+ "filePath": "/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts",
2290
+ "packageName": "@happyvertical/smrt-human-resources",
2291
+ "fields": {},
2292
+ "methods": {},
2293
+ "decoratorConfig": {
2294
+ "api": {
2295
+ "include": []
2296
+ },
2297
+ "mcp": {
2298
+ "include": []
2299
+ },
2300
+ "cli": false,
2301
+ "tableName": "held_qualification_changes"
2302
+ },
2303
+ "extends": "SmrtCollection",
2304
+ "extendsTypeArg": "HeldQualificationChange",
2305
+ "exportName": "HeldQualificationChangeCollection",
2306
+ "collectionExportName": "HeldQualificationChangeCollectionCollection",
2307
+ "schema": {
2308
+ "tableName": "held_qualification_changes",
2309
+ "ddl": "CREATE TABLE IF NOT EXISTS \"held_qualification_changes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"held_qualification_id\" UUID,\n \"kind\" TEXT,\n \"effective_on\" TEXT,\n \"reason\" TEXT,\n \"actor_profile_id\" UUID\n);",
2310
+ "columns": {
2311
+ "id": {
2312
+ "type": "UUID",
2313
+ "primaryKey": true,
2314
+ "referenceKind": "id",
2315
+ "notNull": true
2316
+ },
2317
+ "slug": {
2318
+ "type": "TEXT",
2319
+ "notNull": true
2320
+ },
2321
+ "context": {
2322
+ "type": "TEXT",
2323
+ "notNull": true,
2324
+ "default": ""
2325
+ },
2326
+ "created_at": {
2327
+ "type": "TIMESTAMP",
2328
+ "notNull": true,
2329
+ "default": "current_timestamp"
2330
+ },
2331
+ "updated_at": {
2332
+ "type": "TIMESTAMP",
2333
+ "notNull": true,
2334
+ "default": "current_timestamp"
2335
+ },
2336
+ "tenant_id": {
2337
+ "type": "UUID",
2338
+ "referenceKind": "tenantId",
2339
+ "notNull": true,
2340
+ "unique": false
2341
+ },
2342
+ "held_qualification_id": {
2343
+ "type": "UUID",
2344
+ "referenceKind": "foreignKey",
2345
+ "notNull": false,
2346
+ "unique": false,
2347
+ "foreignKey": {
2348
+ "table": "held_qualifications",
2349
+ "column": "id",
2350
+ "onDelete": "RESTRICT",
2351
+ "onUpdate": "CASCADE"
2352
+ }
2353
+ },
2354
+ "kind": {
2355
+ "type": "TEXT",
2356
+ "notNull": false,
2357
+ "unique": false
2358
+ },
2359
+ "effective_on": {
2360
+ "type": "TEXT",
2361
+ "notNull": false,
2362
+ "unique": false
2363
+ },
2364
+ "reason": {
2365
+ "type": "TEXT",
2366
+ "notNull": false,
2367
+ "unique": false
2368
+ },
2369
+ "actor_profile_id": {
2370
+ "type": "UUID",
2371
+ "referenceKind": "crossPackageRef",
2372
+ "notNull": false,
2373
+ "unique": false
2374
+ }
2375
+ },
2376
+ "indexes": [
2377
+ {
2378
+ "name": "held_qualification_changes_slug_context_idx",
2379
+ "columns": [
2380
+ "tenant_id",
2381
+ "slug",
2382
+ "context"
2383
+ ],
2384
+ "unique": true
2385
+ },
2386
+ {
2387
+ "name": "held_qualification_changes_held_idx",
2388
+ "columns": [
2389
+ "tenant_id",
2390
+ "held_qualification_id",
2391
+ "effective_on"
2392
+ ]
2393
+ },
2394
+ {
2395
+ "name": "held_qualification_changes_tenant_id_created_at_idx",
2396
+ "columns": [
2397
+ "tenant_id",
2398
+ "created_at"
2399
+ ]
2400
+ },
2401
+ {
2402
+ "name": "held_qualification_changes_held_qualification_id_idx",
2403
+ "columns": [
2404
+ "held_qualification_id"
2405
+ ]
2406
+ },
2407
+ {
2408
+ "name": "held_qualification_changes_actor_profile_id_idx",
2409
+ "columns": [
2410
+ "actor_profile_id"
2411
+ ]
2412
+ }
2413
+ ],
2414
+ "version": "ed9ed5e1"
2415
+ },
2416
+ "importPath": "@happyvertical/smrt-human-resources"
2417
+ }
2418
+ },
2419
+ "moduleType": "smrt",
2420
+ "smrtDependencies": [
2421
+ "@happyvertical/smrt-core",
2422
+ "@happyvertical/smrt-tenancy"
2423
+ ]
2424
+ }