From debcb308754d2a9e1f1ab76d6355ad4f2242a5c2 Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 18 May 2017 16:00:39 +0200 Subject: associations for ama --- model.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model.js b/model.js index d365bbb..dca6e43 100644 --- a/model.js +++ b/model.js @@ -46,6 +46,8 @@ module.exports = (seq, Seq) => { Roster.belongsTo(Match, { foreignKey: "match_api_id", targetKey: "api_id" }); Participant.belongsTo(Roster, { foreignKey: "roster_api_id", targetKey: "api_id" }); + Participant.belongsTo(Match, { foreignKey: "match_api_id", targetKey: "api_id" }); + Participant.belongsTo(Player, { foreignKey: "player_api_id", targetKey: "api_id" }); Participant.hasMany(ParticipantStats, { as: "participant_stats", foreignKey: "participant_api_id", sourceKey: "api_id" }); /* Participant.belongsTo(GameMode, { foreignKey: "game_mode_id" }); -- cgit v1.3.1