feat: robot has many association w run

This commit is contained in:
karishmas6
2024-10-09 03:31:31 +05:30
parent 49f6193b37
commit 646626469f

View File

@@ -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;