From cc8af9d14afdb5e3229da37279cfb2d9fa07ae4a Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 25 Jun 2024 10:21:24 +0200 Subject: [PATCH] refs #6553 fix back --- modules/client/back/models/business.json | 8 +++++--- .../models/{occupationCode.json => occupation-code.json} | 0 modules/client/back/models/worker-business-type.json | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) rename modules/client/back/models/{occupationCode.json => occupation-code.json} (100%) diff --git a/modules/client/back/models/business.json b/modules/client/back/models/business.json index 1a500d444..dc6cd0bcd 100644 --- a/modules/client/back/models/business.json +++ b/modules/client/back/models/business.json @@ -42,7 +42,7 @@ "type": "string" }, "departmentFk": { - "type": "number" + "type": "string" }, "workerBusinessProfessionalCategoryFk": { "type": "number" @@ -91,7 +91,8 @@ "companyCode": { "type": "belongsTo", "model": "Company", - "foreignKey": "companyCodeFk" + "foreignKey": "companyCodeFk", + "primaryKey": "code" }, "reasonEnd": { "type": "belongsTo", @@ -101,7 +102,8 @@ "occupationCode": { "type": "belongsTo", "model": "OccupationCode", - "foreignKey":"occupationCodeFk" + "foreignKey":"occupationCodeFk", + "primaryKey": "code" }, "payrollCategory": { "type": "belongsTo", diff --git a/modules/client/back/models/occupationCode.json b/modules/client/back/models/occupation-code.json similarity index 100% rename from modules/client/back/models/occupationCode.json rename to modules/client/back/models/occupation-code.json diff --git a/modules/client/back/models/worker-business-type.json b/modules/client/back/models/worker-business-type.json index 146bac7ab..648ce3fd2 100644 --- a/modules/client/back/models/worker-business-type.json +++ b/modules/client/back/models/worker-business-type.json @@ -8,7 +8,8 @@ }, "properties": { "id": { - "type": "number" + "type": "number", + "id": true }, "name": { "type": "string"