summaryrefslogtreecommitdiffstats
path: root/server/models/client.js
diff options
context:
space:
mode:
authorUdo Walter2018-09-17 23:34:40 +0200
committerUdo Walter2018-09-17 23:34:40 +0200
commit20932daf5ab54721118726d78340e78d0793cbe3 (patch)
tree5da3385a404554736ce107aa49e49d8596fd7172 /server/models/client.js
parentadd ipxe entry and config database migrations and models (diff)
downloadbas-20932daf5ab54721118726d78340e78d0793cbe3.tar.gz
bas-20932daf5ab54721118726d78340e78d0793cbe3.tar.xz
bas-20932daf5ab54721118726d78340e78d0793cbe3.zip
add ipxe config relation to groups and clients
Diffstat (limited to 'server/models/client.js')
-rw-r--r--server/models/client.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/models/client.js b/server/models/client.js
index 5789788..c279cfc 100644
--- a/server/models/client.js
+++ b/server/models/client.js
@@ -18,6 +18,7 @@ module.exports = (sequelize, DataTypes) => {
client.associate = function (models) {
var GroupXClient = sequelize.define('group_x_client', {}, { timestamps: false, freezeTableName: true })
client.belongsToMany(models.group, { as: 'groups', through: GroupXClient, foreignKey: 'clientId', otherKey: 'groupId' })
+ client.belongsTo(models.config)
}
return client
}