diff --git a/modules/worker/back/models/worker-income.json b/modules/worker/back/models/worker-income.json index 1ba9c1738..3a7f3407a 100644 --- a/modules/worker/back/models/worker-income.json +++ b/modules/worker/back/models/worker-income.json @@ -33,13 +33,13 @@ "relations": { "payrollComponent": { "type": "belongsTo", - "model": "payrollComponent", + "model": "PayrollComponent", "foreignKey": "id" }, - "worker": { - "type": "hasMany", + "worker": { + "type": "belongsTo", "model": "Worker", - "foreignKey": "id" - } + "foreignKey": "workerFk" + } } } diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 4796c6373..4d3f57b9f 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -115,6 +115,11 @@ "type": "hasMany", "model": "Locker", "foreignKey": "workerFk" + }, + "incomes": { + "type": "hasMany", + "model": "WorkerIncome", + "foreignKey": "workerFk" } }, "acls": [ @@ -126,4 +131,4 @@ "principalId": "$owner" } ] -} \ No newline at end of file +}