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"