Associations fix

This commit is contained in:
Torsten Schulz
2024-09-25 17:52:53 +02:00
parent 08259863ab
commit 03ab768c61
2 changed files with 3 additions and 0 deletions

View File

@@ -85,6 +85,8 @@ Season.hasMany(Match, { foreignKey: 'seasonId', as: 'matches' });
Match.belongsTo(Location, { foreignKey: 'locationId', as: 'location' });
Location.hasMany(Match, { foreignKey: 'locationId', as: 'matches' });
User.belongsTo(UserClub, { foreignKey: 'userClub', as: 'clubUser' });
UserClub.hasMany(User, { foreignKey: 'userClub', as: 'userClub' });
export {
User,
Log,