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