cambiar fks por relaciones

This commit is contained in:
Pau 2023-01-13 15:42:00 +01:00
parent 4f2472ea90
commit a8e4c9e1de
1 changed files with 18 additions and 10 deletions

View File

@ -7,19 +7,27 @@
}
},
"properties": {
"expeditionFk": {
"id": true,
"type": "number"
},
"workerFk": {
"type": "number"
},
"typeFk": {
"type": "number"
},
"created": {
"type": "date"
}
},
"relations": {
"expedition": {
"type": "belongsTo",
"model": "Expedition",
"foreignKey": "expeditionFk"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
},
"type": {
"type": "belongsTo",
"model": "MistakeType",
"foreignKey": "typeFk"
}
}
}