wikijs-fork/server/models/_relations.js

11 lines
225 B
JavaScript
Raw Normal View History

'use strict'
/**
* Associate DB Model relations
*/
module.exports = db => {
db.User.belongsToMany(db.Group, { through: 'UserGroups' })
db.Group.hasMany(db.Right, { as: 'GroupRights' })
db.File.belongsTo(db.Folder)
}