summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-04-01 12:06:16 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-04-01 12:06:16 +0200
commit90077fffc279fec3d3a0d02c7a701a20b3888fe2 (patch)
tree170724597292ccac0ba5a92bdf54dba4950a6e2e
parentbe4e78d7b769b9798fa7938909e4ee9fbba3977e (diff)
downloadorm-90077fffc279fec3d3a0d02c7a701a20b3888fe2.tar.gz
orm-90077fffc279fec3d3a0d02c7a701a20b3888fe2.zip
add _ext tables to model
-rw-r--r--model.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/model.js b/model.js
index d5ef5d6..7ad84c3 100644
--- a/model.js
+++ b/model.js
@@ -7,8 +7,10 @@ module.exports = (seq, Seq) => {
Roster = seq.import("./models/roster.js"),
//Team = seq.import("./models/team.js"),
Participant = seq.import("./models/participant.js"),
+ ParticipantExt = seq.import("./models/participant_ext.js"),
ParticipantItemUse = seq.import("./models/participant_item_use.js"),
Player = seq.import("./models/player.js"),
+ PlayerExt = seq.import("./models/player_ext.js"),
Item = seq.import("./models/item.js");
Match.hasMany(Asset, {as: "Assets"});
@@ -20,7 +22,9 @@ module.exports = (seq, Seq) => {
Participant.hasOne(Player, { foreignKey: "player_api_id", targetKey: "api_id" });
ParticipantItemUse.belongsTo(Participant, { foreignKey: "participant_api_id", targetKey: "api_id" });
ParticipantItemUse.hasOne(Item);
+ ParticipantExt.belongsTo(Participant, { foreignKey: "participant_api_id", targetKey: "api_id" });
+ PlayerExt.belongsTo(Player, { foreignKey: "player_api_id", targetKey: "api_id" });
//return {Match, Roster, Team, Participant, Player, Asset};
- return {Match, Roster, Participant, ParticipantItemUse, Player, Asset, Item};
+ return {Match, Roster, Participant, ParticipantExt, ParticipantItemUse, Player, PlayerExt, Asset, Item};
};