11 lines
225 B
JavaScript
11 lines
225 B
JavaScript
|
'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)
|
||
|
}
|