feat: robot & run association
This commit is contained in:
7
server/src/models/associations.ts
Normal file
7
server/src/models/associations.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import Robot from './Robot';
|
||||||
|
import Run from './Run';
|
||||||
|
|
||||||
|
export default function setupAssociations() {
|
||||||
|
Run.belongsTo(Robot, { foreignKey: 'robotId' });
|
||||||
|
Robot.hasMany(Run, { foreignKey: 'robotId' });
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user