@happyvertical/smrt-human-resources 0.54.2 → 0.54.3

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.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { TenantScoped, getTenantId, tenantId, withTenant } from "@happyvertical/
5
5
  import { createLogger } from "@happyvertical/logger";
6
6
  import { NestedTransactionError } from "@happyvertical/sql";
7
7
  //#region src/__smrt-register__.ts
8
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-human-resources\",\"packageVersion\":\"0.54.2\",\"objects\":{\"@happyvertical/smrt-human-resources:Employment\":{\"name\":\"employment\",\"className\":\"Employment\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:Employment\",\"collection\":\"employments\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"profileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\",\"_meta\":{\"onDelete\":\"RESTRICT\"}},\"userId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-users:User\",\"_meta\":{\"nullable\":true}},\"employerProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\",\"_meta\":{\"nullable\":true,\"onDelete\":\"RESTRICT\"}},\"employeeNumber\":{\"type\":\"text\",\"required\":false},\"workerType\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"position\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"status\":{\"type\":\"text\",\"required\":false,\"_meta\":{}}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"employments\",\"sensitive\":true,\"conflictColumns\":[\"tenant_id\",\"employee_number\"],\"indexes\":[{\"name\":\"employments_tenant_profile_uq\",\"columns\":[\"tenantId\",\"profileId\"],\"unique\":true},{\"name\":\"employments_tenant_user_idx\",\"columns\":[\"tenantId\",\"userId\"]}],\"api\":{\"include\":[]},\"cli\":{\"include\":[]},\"mcp\":{\"include\":[]},\"tenantScoped\":{\"mode\":\"required\"}},\"extends\":\"SmrtObject\",\"exportName\":\"Employment\",\"collectionExportName\":\"EmploymentCollection\",\"validationRules\":[],\"schema\":{\"tableName\":\"employments\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"user_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"employer_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"employee_number\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"worker_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"position\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"employments_tenant_id_employee_number_idx\",\"columns\":[\"tenant_id\",\"employee_number\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"employments_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"employments_tenant_profile_uq\",\"columns\":[\"tenant_id\",\"profile_id\"],\"unique\":true},{\"name\":\"employments_tenant_user_idx\",\"columns\":[\"tenant_id\",\"user_id\"]},{\"name\":\"employments_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"employments_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"employments_user_id_idx\",\"columns\":[\"user_id\"]},{\"name\":\"employments_employer_profile_id_idx\",\"columns\":[\"employer_profile_id\"]}],\"version\":\"ff7ef7a8\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:EmploymentTerm\":{\"name\":\"employmentterm\",\"className\":\"EmploymentTerm\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:EmploymentTerm\",\"collection\":\"employmentterms\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"employmentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Employment\",\"_meta\":{\"onDelete\":\"RESTRICT\"}},\"startedOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"endedOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"endReason\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"employment_terms\",\"sensitive\":true,\"indexes\":[{\"name\":\"employment_terms_employment_idx\",\"columns\":[\"tenantId\",\"employmentId\",\"startedOn\"]}],\"api\":{\"include\":[]},\"cli\":{\"include\":[]},\"mcp\":{\"include\":[]},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"EmploymentTerm\",\"collectionExportName\":\"EmploymentTermCollection\",\"validationRules\":[],\"schema\":{\"tableName\":\"employment_terms\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"employment_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"employments\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"started_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"ended_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"end_reason\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"employment_terms_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"employment_terms_employment_idx\",\"columns\":[\"tenant_id\",\"employment_id\",\"started_on\"]},{\"name\":\"employment_terms_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"employment_terms_employment_id_idx\",\"columns\":[\"employment_id\"]}],\"version\":\"165d209b\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:EmploymentChange\":{\"name\":\"employmentchange\",\"className\":\"EmploymentChange\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:EmploymentChange\",\"collection\":\"employmentchanges\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"employmentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Employment\",\"_meta\":{\"onDelete\":\"RESTRICT\"}},\"kind\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"effectiveOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"fromValue\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"toValue\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"note\":{\"type\":\"text\",\"required\":false},\"actorProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\",\"_meta\":{\"onDelete\":\"RESTRICT\"}}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"employment_changes\",\"sensitive\":true,\"indexes\":[{\"name\":\"employment_changes_employment_idx\",\"columns\":[\"tenantId\",\"employmentId\",\"effectiveOn\"]}],\"api\":{\"include\":[]},\"cli\":{\"include\":[]},\"mcp\":{\"include\":[]},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"EmploymentChange\",\"collectionExportName\":\"EmploymentChangeCollection\",\"validationRules\":[],\"schema\":{\"tableName\":\"employment_changes\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"employment_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"employments\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"kind\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"effective_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"from_value\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"to_value\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"note\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"employment_changes_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"employment_changes_employment_idx\",\"columns\":[\"tenant_id\",\"employment_id\",\"effective_on\"]},{\"name\":\"employment_changes_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"employment_changes_employment_id_idx\",\"columns\":[\"employment_id\"]},{\"name\":\"employment_changes_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]}],\"version\":\"5d93422f\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:EmploymentCollection\":{\"name\":\"employmentcollection\",\"className\":\"EmploymentCollection\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:EmploymentCollection\",\"collection\":\"employments\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"employments\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Employment\",\"exportName\":\"EmploymentCollection\",\"collectionExportName\":\"EmploymentCollectionCollection\",\"schema\":{\"tableName\":\"employments\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"user_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"employer_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"employee_number\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"worker_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"position\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"employments_tenant_id_employee_number_idx\",\"columns\":[\"tenant_id\",\"employee_number\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"employments_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"employments_tenant_profile_uq\",\"columns\":[\"tenant_id\",\"profile_id\"],\"unique\":true},{\"name\":\"employments_tenant_user_idx\",\"columns\":[\"tenant_id\",\"user_id\"]},{\"name\":\"employments_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"employments_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"employments_user_id_idx\",\"columns\":[\"user_id\"]},{\"name\":\"employments_employer_profile_id_idx\",\"columns\":[\"employer_profile_id\"]}],\"version\":\"ff7ef7a8\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:EmploymentTermCollection\":{\"name\":\"employmenttermcollection\",\"className\":\"EmploymentTermCollection\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:EmploymentTermCollection\",\"collection\":\"employmentterms\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"employment_terms\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"EmploymentTerm\",\"exportName\":\"EmploymentTermCollection\",\"collectionExportName\":\"EmploymentTermCollectionCollection\",\"schema\":{\"tableName\":\"employment_terms\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"employment_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"employments\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"started_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"ended_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"end_reason\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"employment_terms_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"employment_terms_employment_idx\",\"columns\":[\"tenant_id\",\"employment_id\",\"started_on\"]},{\"name\":\"employment_terms_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"employment_terms_employment_id_idx\",\"columns\":[\"employment_id\"]}],\"version\":\"165d209b\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:EmploymentChangeCollection\":{\"name\":\"employmentchangecollection\",\"className\":\"EmploymentChangeCollection\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:EmploymentChangeCollection\",\"collection\":\"employmentchanges\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"employment_changes\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"EmploymentChange\",\"exportName\":\"EmploymentChangeCollection\",\"collectionExportName\":\"EmploymentChangeCollectionCollection\",\"schema\":{\"tableName\":\"employment_changes\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"employment_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"employments\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"kind\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"effective_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"from_value\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"to_value\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"note\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"employment_changes_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"employment_changes_employment_idx\",\"columns\":[\"tenant_id\",\"employment_id\",\"effective_on\"]},{\"name\":\"employment_changes_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"employment_changes_employment_id_idx\",\"columns\":[\"employment_id\"]},{\"name\":\"employment_changes_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]}],\"version\":\"5d93422f\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:Qualification\":{\"name\":\"qualification\",\"className\":\"Qualification\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:Qualification\",\"collection\":\"qualifications\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"key\":{\"type\":\"text\",\"required\":false},\"name\":{\"type\":\"text\",\"required\":false},\"kind\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"issuingBody\":{\"type\":\"text\",\"required\":false},\"expires\":{\"type\":\"boolean\",\"required\":true,\"default\":false},\"validityMonths\":{\"type\":\"integer\",\"required\":false,\"_meta\":{\"nullable\":true}},\"scope\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"isActive\":{\"type\":\"boolean\",\"required\":true,\"default\":true}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"qualifications\",\"sensitive\":true,\"conflictColumns\":[\"tenant_id\",\"key\"],\"api\":{\"include\":[]},\"cli\":{\"include\":[]},\"mcp\":{\"include\":[]},\"tenantScoped\":{\"mode\":\"required\"}},\"extends\":\"SmrtObject\",\"exportName\":\"Qualification\",\"collectionExportName\":\"QualificationCollection\",\"validationRules\":[{\"field\":\"expires\",\"rule\":\"required\",\"fieldType\":\"boolean\"},{\"field\":\"isActive\",\"rule\":\"required\",\"fieldType\":\"boolean\"}],\"schema\":{\"tableName\":\"qualifications\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"key\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"kind\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"issuing_body\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"expires\":{\"type\":\"BOOLEAN\",\"notNull\":true,\"unique\":false,\"default\":false},\"validity_months\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"scope\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"is_active\":{\"type\":\"BOOLEAN\",\"notNull\":true,\"unique\":false,\"default\":true}},\"indexes\":[{\"name\":\"qualifications_tenant_id_key_idx\",\"columns\":[\"tenant_id\",\"key\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"qualifications_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"qualifications_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"c9fa3721\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:HeldQualification\":{\"name\":\"heldqualification\",\"className\":\"HeldQualification\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:HeldQualification\",\"collection\":\"heldqualifications\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"qualificationId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Qualification\",\"_meta\":{\"onDelete\":\"RESTRICT\"}},\"profileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\",\"_meta\":{\"onDelete\":\"RESTRICT\"}},\"employmentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Employment\",\"_meta\":{\"nullable\":true,\"onDelete\":\"RESTRICT\"}},\"issuedOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"expiresOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"nullable\":true}},\"certificateNumber\":{\"type\":\"text\",\"required\":false},\"status\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"verifiedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\",\"_meta\":{\"nullable\":true,\"onDelete\":\"RESTRICT\"}},\"verifiedAt\":{\"type\":\"datetime\",\"required\":false},\"documentAssetId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-assets:Asset\",\"_meta\":{\"nullable\":true}},\"renewalOfId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"HeldQualification\",\"_meta\":{\"nullable\":true,\"onDelete\":\"RESTRICT\"}}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"held_qualifications\",\"sensitive\":true,\"indexes\":[{\"name\":\"held_qualifications_profile_idx\",\"columns\":[\"tenantId\",\"profileId\",\"qualificationId\"]},{\"name\":\"held_qualifications_expiry_idx\",\"columns\":[\"tenantId\",\"status\",\"expiresOn\"]}],\"api\":{\"include\":[]},\"cli\":{\"include\":[]},\"mcp\":{\"include\":[]},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"HeldQualification\",\"collectionExportName\":\"HeldQualificationCollection\",\"validationRules\":[],\"schema\":{\"tableName\":\"held_qualifications\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"qualification_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"qualifications\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"employment_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"employments\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"issued_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"expires_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"certificate_number\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"verified_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"verified_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"document_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"renewal_of_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"held_qualifications\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}}},\"indexes\":[{\"name\":\"held_qualifications_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"held_qualifications_profile_idx\",\"columns\":[\"tenant_id\",\"profile_id\",\"qualification_id\"]},{\"name\":\"held_qualifications_expiry_idx\",\"columns\":[\"tenant_id\",\"status\",\"expires_on\"]},{\"name\":\"held_qualifications_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"held_qualifications_qualification_id_idx\",\"columns\":[\"qualification_id\"]},{\"name\":\"held_qualifications_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"held_qualifications_employment_id_idx\",\"columns\":[\"employment_id\"]},{\"name\":\"held_qualifications_verified_by_profile_id_idx\",\"columns\":[\"verified_by_profile_id\"]},{\"name\":\"held_qualifications_document_asset_id_idx\",\"columns\":[\"document_asset_id\"]},{\"name\":\"held_qualifications_renewal_of_id_idx\",\"columns\":[\"renewal_of_id\"]}],\"version\":\"fafbe37f\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:HeldQualificationChange\":{\"name\":\"heldqualificationchange\",\"className\":\"HeldQualificationChange\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:HeldQualificationChange\",\"collection\":\"heldqualificationchanges\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"sqlType\":\"UUID\",\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":true,\"autoPopulate\":true,\"nullable\":false,\"mode\":\"required\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"heldQualificationId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"HeldQualification\",\"_meta\":{\"onDelete\":\"RESTRICT\"}},\"kind\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"effectiveOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"reason\":{\"type\":\"text\",\"required\":false},\"actorProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\",\"_meta\":{\"onDelete\":\"RESTRICT\"}}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"held_qualification_changes\",\"sensitive\":true,\"indexes\":[{\"name\":\"held_qualification_changes_held_idx\",\"columns\":[\"tenantId\",\"heldQualificationId\",\"effectiveOn\"]}],\"api\":{\"include\":[]},\"cli\":{\"include\":[]},\"mcp\":{\"include\":[]},\"tenantScoped\":{\"mode\":\"required\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"HeldQualificationChange\",\"collectionExportName\":\"HeldQualificationChangeCollection\",\"validationRules\":[],\"schema\":{\"tableName\":\"held_qualification_changes\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"held_qualification_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"held_qualifications\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"kind\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"effective_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"reason\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"held_qualification_changes_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"held_qualification_changes_held_idx\",\"columns\":[\"tenant_id\",\"held_qualification_id\",\"effective_on\"]},{\"name\":\"held_qualification_changes_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"held_qualification_changes_held_qualification_id_idx\",\"columns\":[\"held_qualification_id\"]},{\"name\":\"held_qualification_changes_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]}],\"version\":\"ed9ed5e1\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:QualificationCollection\":{\"name\":\"qualificationcollection\",\"className\":\"QualificationCollection\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:QualificationCollection\",\"collection\":\"qualifications\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"qualifications\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Qualification\",\"exportName\":\"QualificationCollection\",\"collectionExportName\":\"QualificationCollectionCollection\",\"schema\":{\"tableName\":\"qualifications\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"key\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"kind\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"issuing_body\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"expires\":{\"type\":\"BOOLEAN\",\"notNull\":true,\"unique\":false,\"default\":false},\"validity_months\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"scope\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"is_active\":{\"type\":\"BOOLEAN\",\"notNull\":true,\"unique\":false,\"default\":true}},\"indexes\":[{\"name\":\"qualifications_tenant_id_key_idx\",\"columns\":[\"tenant_id\",\"key\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"qualifications_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"qualifications_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"c9fa3721\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:HeldQualificationCollection\":{\"name\":\"heldqualificationcollection\",\"className\":\"HeldQualificationCollection\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:HeldQualificationCollection\",\"collection\":\"heldqualifications\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"held_qualifications\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"HeldQualification\",\"exportName\":\"HeldQualificationCollection\",\"collectionExportName\":\"HeldQualificationCollectionCollection\",\"schema\":{\"tableName\":\"held_qualifications\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"qualification_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"qualifications\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"employment_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"employments\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"issued_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"expires_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"certificate_number\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"verified_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"verified_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"document_asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"renewal_of_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"held_qualifications\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}}},\"indexes\":[{\"name\":\"held_qualifications_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"held_qualifications_profile_idx\",\"columns\":[\"tenant_id\",\"profile_id\",\"qualification_id\"]},{\"name\":\"held_qualifications_expiry_idx\",\"columns\":[\"tenant_id\",\"status\",\"expires_on\"]},{\"name\":\"held_qualifications_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"held_qualifications_qualification_id_idx\",\"columns\":[\"qualification_id\"]},{\"name\":\"held_qualifications_profile_id_idx\",\"columns\":[\"profile_id\"]},{\"name\":\"held_qualifications_employment_id_idx\",\"columns\":[\"employment_id\"]},{\"name\":\"held_qualifications_verified_by_profile_id_idx\",\"columns\":[\"verified_by_profile_id\"]},{\"name\":\"held_qualifications_document_asset_id_idx\",\"columns\":[\"document_asset_id\"]},{\"name\":\"held_qualifications_renewal_of_id_idx\",\"columns\":[\"renewal_of_id\"]}],\"version\":\"fafbe37f\"},\"importPath\":\"@happyvertical/smrt-human-resources\"},\"@happyvertical/smrt-human-resources:HeldQualificationChangeCollection\":{\"name\":\"heldqualificationchangecollection\",\"className\":\"HeldQualificationChangeCollection\",\"qualifiedName\":\"@happyvertical/smrt-human-resources:HeldQualificationChangeCollection\",\"collection\":\"heldqualificationchanges\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts\",\"packageName\":\"@happyvertical/smrt-human-resources\",\"fields\":{},\"methods\":{},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"held_qualification_changes\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"HeldQualificationChange\",\"exportName\":\"HeldQualificationChangeCollection\",\"collectionExportName\":\"HeldQualificationChangeCollectionCollection\",\"schema\":{\"tableName\":\"held_qualification_changes\",\"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);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":true,\"unique\":false},\"held_qualification_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"held_qualifications\",\"column\":\"id\",\"onDelete\":\"RESTRICT\",\"onUpdate\":\"CASCADE\"}},\"kind\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"effective_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"reason\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"actor_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"held_qualification_changes_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true},{\"name\":\"held_qualification_changes_held_idx\",\"columns\":[\"tenant_id\",\"held_qualification_id\",\"effective_on\"]},{\"name\":\"held_qualification_changes_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"held_qualification_changes_held_qualification_id_idx\",\"columns\":[\"held_qualification_id\"]},{\"name\":\"held_qualification_changes_actor_profile_id_idx\",\"columns\":[\"actor_profile_id\"]}],\"version\":\"ed9ed5e1\"},\"importPath\":\"@happyvertical/smrt-human-resources\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
8
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-human-resources","packageVersion":"0.54.3","objects":{"@happyvertical/smrt-human-resources:Employment":{"name":"employment","className":"Employment","qualifiedName":"@happyvertical/smrt-human-resources:Employment","collection":"employments","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"profileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"onDelete":"RESTRICT"}},"userId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-users:User","_meta":{"nullable":true}},"employerProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"nullable":true,"onDelete":"RESTRICT"}},"employeeNumber":{"type":"text","required":false},"workerType":{"type":"text","required":false,"_meta":{}},"position":{"type":"text","required":false,"_meta":{"nullable":true}},"status":{"type":"text","required":false,"_meta":{}}},"methods":{"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"employments","sensitive":true,"conflictColumns":["tenant_id","employee_number"],"indexes":[{"name":"employments_tenant_profile_uq","columns":["tenantId","profileId"],"unique":true},{"name":"employments_tenant_user_idx","columns":["tenantId","userId"]}],"api":{"include":[]},"cli":{"include":[]},"mcp":{"include":[]},"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Employment","collectionExportName":"EmploymentCollection","validationRules":[],"schema":{"tableName":"employments","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"employer_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"employee_number":{"type":"TEXT","notNull":false,"unique":false},"worker_type":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"employments_tenant_id_employee_number_idx","columns":["tenant_id","employee_number"],"unique":true,"nullsNotDistinct":true},{"name":"employments_slug_context_idx","columns":["slug","context"]},{"name":"employments_tenant_profile_uq","columns":["tenant_id","profile_id"],"unique":true},{"name":"employments_tenant_user_idx","columns":["tenant_id","user_id"]},{"name":"employments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"employments_profile_id_idx","columns":["profile_id"]},{"name":"employments_user_id_idx","columns":["user_id"]},{"name":"employments_employer_profile_id_idx","columns":["employer_profile_id"]}],"version":"ff7ef7a8"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:EmploymentTerm":{"name":"employmentterm","className":"EmploymentTerm","qualifiedName":"@happyvertical/smrt-human-resources:EmploymentTerm","collection":"employmentterms","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"employmentId":{"type":"foreignKey","required":false,"related":"Employment","_meta":{"onDelete":"RESTRICT"}},"startedOn":{"type":"text","required":false,"_meta":{}},"endedOn":{"type":"text","required":false,"_meta":{"nullable":true}},"endReason":{"type":"text","required":false}},"methods":{"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"employment_terms","sensitive":true,"indexes":[{"name":"employment_terms_employment_idx","columns":["tenantId","employmentId","startedOn"]}],"api":{"include":[]},"cli":{"include":[]},"mcp":{"include":[]},"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"EmploymentTerm","collectionExportName":"EmploymentTermCollection","validationRules":[],"schema":{"tableName":"employment_terms","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"employment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"employments","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"started_on":{"type":"TEXT","notNull":false,"unique":false},"ended_on":{"type":"TEXT","notNull":false,"unique":false},"end_reason":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"employment_terms_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"employment_terms_employment_idx","columns":["tenant_id","employment_id","started_on"]},{"name":"employment_terms_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"employment_terms_employment_id_idx","columns":["employment_id"]}],"version":"165d209b"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:EmploymentChange":{"name":"employmentchange","className":"EmploymentChange","qualifiedName":"@happyvertical/smrt-human-resources:EmploymentChange","collection":"employmentchanges","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"employmentId":{"type":"foreignKey","required":false,"related":"Employment","_meta":{"onDelete":"RESTRICT"}},"kind":{"type":"text","required":false,"_meta":{}},"effectiveOn":{"type":"text","required":false,"_meta":{}},"fromValue":{"type":"text","required":false,"_meta":{"nullable":true}},"toValue":{"type":"text","required":false,"_meta":{"nullable":true}},"note":{"type":"text","required":false},"actorProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"onDelete":"RESTRICT"}}},"methods":{"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"employment_changes","sensitive":true,"indexes":[{"name":"employment_changes_employment_idx","columns":["tenantId","employmentId","effectiveOn"]}],"api":{"include":[]},"cli":{"include":[]},"mcp":{"include":[]},"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"EmploymentChange","collectionExportName":"EmploymentChangeCollection","validationRules":[],"schema":{"tableName":"employment_changes","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"employment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"employments","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":false,"unique":false},"effective_on":{"type":"TEXT","notNull":false,"unique":false},"from_value":{"type":"TEXT","notNull":false,"unique":false},"to_value":{"type":"TEXT","notNull":false,"unique":false},"note":{"type":"TEXT","notNull":false,"unique":false},"actor_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false}},"indexes":[{"name":"employment_changes_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"employment_changes_employment_idx","columns":["tenant_id","employment_id","effective_on"]},{"name":"employment_changes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"employment_changes_employment_id_idx","columns":["employment_id"]},{"name":"employment_changes_actor_profile_id_idx","columns":["actor_profile_id"]}],"version":"5d93422f"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:EmploymentCollection":{"name":"employmentcollection","className":"EmploymentCollection","qualifiedName":"@happyvertical/smrt-human-resources:EmploymentCollection","collection":"employments","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{},"methods":{},"decoratorConfig":{"api":{"include":[]},"mcp":{"include":[]},"cli":false,"tableName":"employments"},"extends":"SmrtCollection","extendsTypeArg":"Employment","exportName":"EmploymentCollection","collectionExportName":"EmploymentCollectionCollection","schema":{"tableName":"employments","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"employer_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"employee_number":{"type":"TEXT","notNull":false,"unique":false},"worker_type":{"type":"TEXT","notNull":false,"unique":false},"position":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"employments_tenant_id_employee_number_idx","columns":["tenant_id","employee_number"],"unique":true,"nullsNotDistinct":true},{"name":"employments_slug_context_idx","columns":["slug","context"]},{"name":"employments_tenant_profile_uq","columns":["tenant_id","profile_id"],"unique":true},{"name":"employments_tenant_user_idx","columns":["tenant_id","user_id"]},{"name":"employments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"employments_profile_id_idx","columns":["profile_id"]},{"name":"employments_user_id_idx","columns":["user_id"]},{"name":"employments_employer_profile_id_idx","columns":["employer_profile_id"]}],"version":"ff7ef7a8"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:EmploymentTermCollection":{"name":"employmenttermcollection","className":"EmploymentTermCollection","qualifiedName":"@happyvertical/smrt-human-resources:EmploymentTermCollection","collection":"employmentterms","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{},"methods":{},"decoratorConfig":{"api":{"include":[]},"mcp":{"include":[]},"cli":false,"tableName":"employment_terms"},"extends":"SmrtCollection","extendsTypeArg":"EmploymentTerm","exportName":"EmploymentTermCollection","collectionExportName":"EmploymentTermCollectionCollection","schema":{"tableName":"employment_terms","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"employment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"employments","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"started_on":{"type":"TEXT","notNull":false,"unique":false},"ended_on":{"type":"TEXT","notNull":false,"unique":false},"end_reason":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"employment_terms_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"employment_terms_employment_idx","columns":["tenant_id","employment_id","started_on"]},{"name":"employment_terms_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"employment_terms_employment_id_idx","columns":["employment_id"]}],"version":"165d209b"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:EmploymentChangeCollection":{"name":"employmentchangecollection","className":"EmploymentChangeCollection","qualifiedName":"@happyvertical/smrt-human-resources:EmploymentChangeCollection","collection":"employmentchanges","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/employment/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{},"methods":{},"decoratorConfig":{"api":{"include":[]},"mcp":{"include":[]},"cli":false,"tableName":"employment_changes"},"extends":"SmrtCollection","extendsTypeArg":"EmploymentChange","exportName":"EmploymentChangeCollection","collectionExportName":"EmploymentChangeCollectionCollection","schema":{"tableName":"employment_changes","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"employment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"employments","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":false,"unique":false},"effective_on":{"type":"TEXT","notNull":false,"unique":false},"from_value":{"type":"TEXT","notNull":false,"unique":false},"to_value":{"type":"TEXT","notNull":false,"unique":false},"note":{"type":"TEXT","notNull":false,"unique":false},"actor_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false}},"indexes":[{"name":"employment_changes_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"employment_changes_employment_idx","columns":["tenant_id","employment_id","effective_on"]},{"name":"employment_changes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"employment_changes_employment_id_idx","columns":["employment_id"]},{"name":"employment_changes_actor_profile_id_idx","columns":["actor_profile_id"]}],"version":"5d93422f"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:Qualification":{"name":"qualification","className":"Qualification","qualifiedName":"@happyvertical/smrt-human-resources:Qualification","collection":"qualifications","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"key":{"type":"text","required":false},"name":{"type":"text","required":false},"kind":{"type":"text","required":false,"_meta":{}},"issuingBody":{"type":"text","required":false},"expires":{"type":"boolean","required":true,"default":false},"validityMonths":{"type":"integer","required":false,"_meta":{"nullable":true}},"scope":{"type":"text","required":false,"_meta":{}},"isActive":{"type":"boolean","required":true,"default":true}},"methods":{"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"qualifications","sensitive":true,"conflictColumns":["tenant_id","key"],"api":{"include":[]},"cli":{"include":[]},"mcp":{"include":[]},"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"Qualification","collectionExportName":"QualificationCollection","validationRules":[{"field":"expires","rule":"required","fieldType":"boolean"},{"field":"isActive","rule":"required","fieldType":"boolean"}],"schema":{"tableName":"qualifications","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"key":{"type":"TEXT","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"issuing_body":{"type":"TEXT","notNull":false,"unique":false},"expires":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"validity_months":{"type":"INTEGER","notNull":false,"unique":false},"scope":{"type":"TEXT","notNull":false,"unique":false},"is_active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"qualifications_tenant_id_key_idx","columns":["tenant_id","key"],"unique":true,"nullsNotDistinct":true},{"name":"qualifications_slug_context_idx","columns":["slug","context"]},{"name":"qualifications_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"c9fa3721"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:HeldQualification":{"name":"heldqualification","className":"HeldQualification","qualifiedName":"@happyvertical/smrt-human-resources:HeldQualification","collection":"heldqualifications","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"qualificationId":{"type":"foreignKey","required":false,"related":"Qualification","_meta":{"onDelete":"RESTRICT"}},"profileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"onDelete":"RESTRICT"}},"employmentId":{"type":"foreignKey","required":false,"related":"Employment","_meta":{"nullable":true,"onDelete":"RESTRICT"}},"issuedOn":{"type":"text","required":false,"_meta":{}},"expiresOn":{"type":"text","required":false,"_meta":{"nullable":true}},"certificateNumber":{"type":"text","required":false},"status":{"type":"text","required":false,"_meta":{}},"verifiedByProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"nullable":true,"onDelete":"RESTRICT"}},"verifiedAt":{"type":"datetime","required":false},"documentAssetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset","_meta":{"nullable":true}},"renewalOfId":{"type":"foreignKey","required":false,"related":"HeldQualification","_meta":{"nullable":true,"onDelete":"RESTRICT"}}},"methods":{"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"held_qualifications","sensitive":true,"indexes":[{"name":"held_qualifications_profile_idx","columns":["tenantId","profileId","qualificationId"]},{"name":"held_qualifications_expiry_idx","columns":["tenantId","status","expiresOn"]}],"api":{"include":[]},"cli":{"include":[]},"mcp":{"include":[]},"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"HeldQualification","collectionExportName":"HeldQualificationCollection","validationRules":[],"schema":{"tableName":"held_qualifications","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"qualification_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"qualifications","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"employment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"employments","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"issued_on":{"type":"TEXT","notNull":false,"unique":false},"expires_on":{"type":"TEXT","notNull":false,"unique":false},"certificate_number":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false},"verified_by_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"verified_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"document_asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"renewal_of_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"held_qualifications","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}}},"indexes":[{"name":"held_qualifications_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"held_qualifications_profile_idx","columns":["tenant_id","profile_id","qualification_id"]},{"name":"held_qualifications_expiry_idx","columns":["tenant_id","status","expires_on"]},{"name":"held_qualifications_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"held_qualifications_qualification_id_idx","columns":["qualification_id"]},{"name":"held_qualifications_profile_id_idx","columns":["profile_id"]},{"name":"held_qualifications_employment_id_idx","columns":["employment_id"]},{"name":"held_qualifications_verified_by_profile_id_idx","columns":["verified_by_profile_id"]},{"name":"held_qualifications_document_asset_id_idx","columns":["document_asset_id"]},{"name":"held_qualifications_renewal_of_id_idx","columns":["renewal_of_id"]}],"version":"fafbe37f"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:HeldQualificationChange":{"name":"heldqualificationchange","className":"HeldQualificationChange","qualifiedName":"@happyvertical/smrt-human-resources:HeldQualificationChange","collection":"heldqualificationchanges","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"heldQualificationId":{"type":"foreignKey","required":false,"related":"HeldQualification","_meta":{"onDelete":"RESTRICT"}},"kind":{"type":"text","required":false,"_meta":{}},"effectiveOn":{"type":"text","required":false,"_meta":{}},"reason":{"type":"text","required":false},"actorProfileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile","_meta":{"onDelete":"RESTRICT"}}},"methods":{"save":{"name":"save","async":true,"parameters":[],"returnType":"Promise<this>","isStatic":false,"isPublic":true},"delete":{"name":"delete","async":true,"parameters":[],"returnType":"Promise<void>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"held_qualification_changes","sensitive":true,"indexes":[{"name":"held_qualification_changes_held_idx","columns":["tenantId","heldQualificationId","effectiveOn"]}],"api":{"include":[]},"cli":{"include":[]},"mcp":{"include":[]},"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"HeldQualificationChange","collectionExportName":"HeldQualificationChangeCollection","validationRules":[],"schema":{"tableName":"held_qualification_changes","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"held_qualification_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"held_qualifications","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":false,"unique":false},"effective_on":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"actor_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false}},"indexes":[{"name":"held_qualification_changes_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"held_qualification_changes_held_idx","columns":["tenant_id","held_qualification_id","effective_on"]},{"name":"held_qualification_changes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"held_qualification_changes_held_qualification_id_idx","columns":["held_qualification_id"]},{"name":"held_qualification_changes_actor_profile_id_idx","columns":["actor_profile_id"]}],"version":"ed9ed5e1"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:QualificationCollection":{"name":"qualificationcollection","className":"QualificationCollection","qualifiedName":"@happyvertical/smrt-human-resources:QualificationCollection","collection":"qualifications","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{},"methods":{},"decoratorConfig":{"api":{"include":[]},"mcp":{"include":[]},"cli":false,"tableName":"qualifications"},"extends":"SmrtCollection","extendsTypeArg":"Qualification","exportName":"QualificationCollection","collectionExportName":"QualificationCollectionCollection","schema":{"tableName":"qualifications","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"key":{"type":"TEXT","notNull":false,"unique":false},"name":{"type":"TEXT","notNull":false,"unique":false},"kind":{"type":"TEXT","notNull":false,"unique":false},"issuing_body":{"type":"TEXT","notNull":false,"unique":false},"expires":{"type":"BOOLEAN","notNull":true,"unique":false,"default":false},"validity_months":{"type":"INTEGER","notNull":false,"unique":false},"scope":{"type":"TEXT","notNull":false,"unique":false},"is_active":{"type":"BOOLEAN","notNull":true,"unique":false,"default":true}},"indexes":[{"name":"qualifications_tenant_id_key_idx","columns":["tenant_id","key"],"unique":true,"nullsNotDistinct":true},{"name":"qualifications_slug_context_idx","columns":["slug","context"]},{"name":"qualifications_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"c9fa3721"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:HeldQualificationCollection":{"name":"heldqualificationcollection","className":"HeldQualificationCollection","qualifiedName":"@happyvertical/smrt-human-resources:HeldQualificationCollection","collection":"heldqualifications","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{},"methods":{},"decoratorConfig":{"api":{"include":[]},"mcp":{"include":[]},"cli":false,"tableName":"held_qualifications"},"extends":"SmrtCollection","extendsTypeArg":"HeldQualification","exportName":"HeldQualificationCollection","collectionExportName":"HeldQualificationCollectionCollection","schema":{"tableName":"held_qualifications","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"qualification_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"qualifications","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"employment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"employments","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"issued_on":{"type":"TEXT","notNull":false,"unique":false},"expires_on":{"type":"TEXT","notNull":false,"unique":false},"certificate_number":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":false,"unique":false},"verified_by_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"verified_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"document_asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"renewal_of_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"held_qualifications","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}}},"indexes":[{"name":"held_qualifications_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"held_qualifications_profile_idx","columns":["tenant_id","profile_id","qualification_id"]},{"name":"held_qualifications_expiry_idx","columns":["tenant_id","status","expires_on"]},{"name":"held_qualifications_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"held_qualifications_qualification_id_idx","columns":["qualification_id"]},{"name":"held_qualifications_profile_id_idx","columns":["profile_id"]},{"name":"held_qualifications_employment_id_idx","columns":["employment_id"]},{"name":"held_qualifications_verified_by_profile_id_idx","columns":["verified_by_profile_id"]},{"name":"held_qualifications_document_asset_id_idx","columns":["document_asset_id"]},{"name":"held_qualifications_renewal_of_id_idx","columns":["renewal_of_id"]}],"version":"fafbe37f"},"importPath":"@happyvertical/smrt-human-resources"},"@happyvertical/smrt-human-resources:HeldQualificationChangeCollection":{"name":"heldqualificationchangecollection","className":"HeldQualificationChangeCollection","qualifiedName":"@happyvertical/smrt-human-resources:HeldQualificationChangeCollection","collection":"heldqualificationchanges","filePath":"/home/runner/work/smrt/smrt/packages/human-resources/src/qualifications/models.ts","packageName":"@happyvertical/smrt-human-resources","fields":{},"methods":{},"decoratorConfig":{"api":{"include":[]},"mcp":{"include":[]},"cli":false,"tableName":"held_qualification_changes"},"extends":"SmrtCollection","extendsTypeArg":"HeldQualificationChange","exportName":"HeldQualificationChangeCollection","collectionExportName":"HeldQualificationChangeCollectionCollection","schema":{"tableName":"held_qualification_changes","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);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"held_qualification_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"held_qualifications","column":"id","onDelete":"RESTRICT","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":false,"unique":false},"effective_on":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":false,"unique":false},"actor_profile_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false}},"indexes":[{"name":"held_qualification_changes_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"held_qualification_changes_held_idx","columns":["tenant_id","held_qualification_id","effective_on"]},{"name":"held_qualification_changes_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"held_qualification_changes_held_qualification_id_idx","columns":["held_qualification_id"]},{"name":"held_qualification_changes_actor_profile_id_idx","columns":["actor_profile_id"]}],"version":"ed9ed5e1"},"importPath":"@happyvertical/smrt-human-resources"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-tenancy"],"stampsConstructors":true}`));
9
9
  //#endregion
10
10
  //#region src/dates.ts
11
11
  var ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
@@ -109,6 +109,7 @@ var Employment = class extends SmrtObject {
109
109
  throw new HrError("HR_HISTORY_IMMUTABLE", "Employment history cannot be deleted; end the employment instead.");
110
110
  }
111
111
  };
112
+ __publicField$1(Employment, "__smrtPackage__", "@happyvertical/smrt-human-resources");
112
113
  __decorateClass$1([tenantId()], Employment.prototype, "tenantId", 2);
113
114
  __decorateClass$1([crossPackageRef("@happyvertical/smrt-profiles:Profile", { onDelete: "RESTRICT" })], Employment.prototype, "profileId", 2);
114
115
  __decorateClass$1([crossPackageRef("@happyvertical/smrt-users:User", { nullable: true })], Employment.prototype, "userId", 2);
@@ -154,6 +155,7 @@ var EmploymentTerm = class extends SmrtObject {
154
155
  throw new HrError("HR_HISTORY_IMMUTABLE", "Employment terms cannot be deleted.");
155
156
  }
156
157
  };
158
+ __publicField$1(EmploymentTerm, "__smrtPackage__", "@happyvertical/smrt-human-resources");
157
159
  __decorateClass$1([tenantId()], EmploymentTerm.prototype, "tenantId", 2);
158
160
  __decorateClass$1([foreignKey("Employment", { onDelete: "RESTRICT" })], EmploymentTerm.prototype, "employmentId", 2);
159
161
  __decorateClass$1([field({ type: "text" })], EmploymentTerm.prototype, "startedOn", 2);
@@ -195,6 +197,7 @@ var EmploymentChange = class extends SmrtObject {
195
197
  throw new HrError("HR_HISTORY_IMMUTABLE", "Employment changes cannot be deleted.");
196
198
  }
197
199
  };
200
+ __publicField$1(EmploymentChange, "__smrtPackage__", "@happyvertical/smrt-human-resources");
198
201
  __decorateClass$1([tenantId()], EmploymentChange.prototype, "tenantId", 2);
199
202
  __decorateClass$1([foreignKey("Employment", { onDelete: "RESTRICT" })], EmploymentChange.prototype, "employmentId", 2);
200
203
  __decorateClass$1([field({ type: "text" })], EmploymentChange.prototype, "kind", 2);
@@ -224,6 +227,7 @@ EmploymentChange = __decorateClass$1([TenantScoped({ mode: "required" }), smrt({
224
227
  mcp: { include: [] }
225
228
  })], EmploymentChange);
226
229
  var EmploymentCollection = class extends SmrtCollection {};
230
+ __publicField$1(EmploymentCollection, "__smrtPackage__", "@happyvertical/smrt-human-resources");
227
231
  __publicField$1(EmploymentCollection, "_itemClass", Employment);
228
232
  EmploymentCollection = __decorateClass$1([smrt({
229
233
  api: { include: [] },
@@ -231,6 +235,7 @@ EmploymentCollection = __decorateClass$1([smrt({
231
235
  cli: false
232
236
  })], EmploymentCollection);
233
237
  var EmploymentTermCollection = class extends SmrtCollection {};
238
+ __publicField$1(EmploymentTermCollection, "__smrtPackage__", "@happyvertical/smrt-human-resources");
234
239
  __publicField$1(EmploymentTermCollection, "_itemClass", EmploymentTerm);
235
240
  EmploymentTermCollection = __decorateClass$1([smrt({
236
241
  api: { include: [] },
@@ -238,6 +243,7 @@ EmploymentTermCollection = __decorateClass$1([smrt({
238
243
  cli: false
239
244
  })], EmploymentTermCollection);
240
245
  var EmploymentChangeCollection = class extends SmrtCollection {};
246
+ __publicField$1(EmploymentChangeCollection, "__smrtPackage__", "@happyvertical/smrt-human-resources");
241
247
  __publicField$1(EmploymentChangeCollection, "_itemClass", EmploymentChange);
242
248
  EmploymentChangeCollection = __decorateClass$1([smrt({
243
249
  api: { include: [] },
@@ -283,6 +289,7 @@ var Qualification = class extends SmrtObject {
283
289
  throw new HrError("HR_HISTORY_IMMUTABLE", "Qualifications cannot be deleted; deactivate them instead.");
284
290
  }
285
291
  };
292
+ __publicField(Qualification, "__smrtPackage__", "@happyvertical/smrt-human-resources");
286
293
  __decorateClass([tenantId()], Qualification.prototype, "tenantId", 2);
287
294
  __decorateClass([field({ type: "text" })], Qualification.prototype, "kind", 2);
288
295
  __decorateClass([field({
@@ -333,6 +340,7 @@ var HeldQualification = class extends SmrtObject {
333
340
  throw new HrError("HR_HISTORY_IMMUTABLE", "Held qualifications cannot be deleted; revoke them instead.");
334
341
  }
335
342
  };
343
+ __publicField(HeldQualification, "__smrtPackage__", "@happyvertical/smrt-human-resources");
336
344
  __decorateClass([tenantId()], HeldQualification.prototype, "tenantId", 2);
337
345
  __decorateClass([foreignKey(Qualification, { onDelete: "RESTRICT" })], HeldQualification.prototype, "qualificationId", 2);
338
346
  __decorateClass([crossPackageRef("@happyvertical/smrt-profiles:Profile", { onDelete: "RESTRICT" })], HeldQualification.prototype, "profileId", 2);
@@ -394,6 +402,7 @@ var HeldQualificationChange = class extends SmrtObject {
394
402
  throw new HrError("HR_HISTORY_IMMUTABLE", "Held qualification changes cannot be deleted.");
395
403
  }
396
404
  };
405
+ __publicField(HeldQualificationChange, "__smrtPackage__", "@happyvertical/smrt-human-resources");
397
406
  __decorateClass([tenantId()], HeldQualificationChange.prototype, "tenantId", 2);
398
407
  __decorateClass([foreignKey(HeldQualification, { onDelete: "RESTRICT" })], HeldQualificationChange.prototype, "heldQualificationId", 2);
399
408
  __decorateClass([field({ type: "text" })], HeldQualificationChange.prototype, "kind", 2);
@@ -415,6 +424,7 @@ HeldQualificationChange = __decorateClass([TenantScoped({ mode: "required" }), s
415
424
  mcp: { include: [] }
416
425
  })], HeldQualificationChange);
417
426
  var QualificationCollection = class extends SmrtCollection {};
427
+ __publicField(QualificationCollection, "__smrtPackage__", "@happyvertical/smrt-human-resources");
418
428
  __publicField(QualificationCollection, "_itemClass", Qualification);
419
429
  QualificationCollection = __decorateClass([smrt({
420
430
  api: { include: [] },
@@ -422,6 +432,7 @@ QualificationCollection = __decorateClass([smrt({
422
432
  cli: false
423
433
  })], QualificationCollection);
424
434
  var HeldQualificationCollection = class extends SmrtCollection {};
435
+ __publicField(HeldQualificationCollection, "__smrtPackage__", "@happyvertical/smrt-human-resources");
425
436
  __publicField(HeldQualificationCollection, "_itemClass", HeldQualification);
426
437
  HeldQualificationCollection = __decorateClass([smrt({
427
438
  api: { include: [] },
@@ -429,6 +440,7 @@ HeldQualificationCollection = __decorateClass([smrt({
429
440
  cli: false
430
441
  })], HeldQualificationCollection);
431
442
  var HeldQualificationChangeCollection = class extends SmrtCollection {};
443
+ __publicField(HeldQualificationChangeCollection, "__smrtPackage__", "@happyvertical/smrt-human-resources");
432
444
  __publicField(HeldQualificationChangeCollection, "_itemClass", HeldQualificationChange);
433
445
  HeldQualificationChangeCollection = __decorateClass([smrt({
434
446
  api: { include: [] },