feat: robot has many association w run
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Model, DataTypes, Optional } from 'sequelize';
|
||||
import sequelize from '../db/config';
|
||||
import Run from './Run';
|
||||
|
||||
interface RobotAttributes {
|
||||
id: string;
|
||||
@@ -64,4 +65,6 @@ Robot.init(
|
||||
}
|
||||
);
|
||||
|
||||
Robot.hasMany(Run, { foreignKey: 'robotId' });
|
||||
|
||||
export default Robot;
|
||||
|
||||
Reference in New Issue
Block a user