fix: refs #7986 fix model
This commit is contained in:
parent
b4dc5276dd
commit
39e808bca7
|
@ -1,6 +1,3 @@
|
||||||
|
ALTER TABLE `vn`.`operator`
|
||||||
ALTER TABLE `vn`.`worker`
|
ADD COLUMN `machineFk` int(11) DEFAULT NULL,
|
||||||
ADD COLUMN `motoFk` INT(11) UNSIGNED DEFAULT NULL;
|
ADD CONSTRAINT `operator_machine_FK` FOREIGN KEY (`machineFk`) REFERENCES `vn`.`machine` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
ALTER TABLE `vn`.`worker`
|
|
||||||
ADD CONSTRAINT `worker_machineFk` FOREIGN KEY (`motoFk`) REFERENCES `machine` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;
|
|
||||||
|
|
|
@ -30,7 +30,10 @@
|
||||||
"isOnReservationMode": {
|
"isOnReservationMode": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
},
|
||||||
|
"machineFk": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
"sector": {
|
"sector": {
|
||||||
|
@ -53,6 +56,11 @@
|
||||||
"model": "ItemPackingType",
|
"model": "ItemPackingType",
|
||||||
"foreignKey": "itemPackingTypeFk",
|
"foreignKey": "itemPackingTypeFk",
|
||||||
"primaryKey": "code"
|
"primaryKey": "code"
|
||||||
}
|
},
|
||||||
|
"machine": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Machine",
|
||||||
|
"foreignKey": "machineFk"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue