Skip to content

Commit 44047b6

Browse files
committed
fix: added project relation to copilot requests
1 parent 902e2b3 commit 44047b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/models/copilotRequest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = function defineCopilotRequest(sequelize, DataTypes) {
3232

3333
CopliotRequest.associate = (models) => {
3434
CopliotRequest.hasMany(models.CopilotOpportunity, { as: 'copilotOpportunity', foreignKey: 'copilotRequestId' });
35+
CopliotRequest.belongsTo(models.Project, { as: 'project', foreignKey: 'projectId' });
3536
};
3637

3738
return CopliotRequest;

0 commit comments

Comments
 (0)