diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-07 21:34:43 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-07 21:34:43 +0200 |
| commit | 4a46de3e1d5c4427753c80d3e9f88df49a1c7539 (patch) | |
| tree | 3de5712d270a8bdab0d12959bc91bea9ebd0bfc0 | |
| parent | 4f5f8c552970fef615a8d9e612036c287b03a2c9 (diff) | |
| download | orm-4a46de3e1d5c4427753c80d3e9f88df49a1c7539.tar.gz orm-4a46de3e1d5c4427753c80d3e9f88df49a1c7539.zip | |
link items to participant
| -rw-r--r-- | model.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -21,7 +21,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(Heros, { foreignKey: "actor", targetKey: "api_name" }); + Participant.hasMany(ItemParticipant, { as: "items", foreignKey: "participant_api_id", sourceKey: "api_id" }); + ItemParticipant.belongsTo(Item, { foreignKey: "item_id", targetKey: "id" }); return { Match, Roster, Participant, Player, Asset, |
