feat: cluster implementation

This commit is contained in:
NGPixel
2017-07-29 00:11:22 -04:00
parent 60750eeed8
commit 9c112ab535
15 changed files with 414 additions and 564 deletions

View File

@@ -4,7 +4,10 @@
* Associate DB Model relations
*/
module.exports = db => {
db.User.belongsToMany(db.Group, { through: 'UserGroups' })
db.Group.hasMany(db.Right, { as: 'GroupRights' })
db.User.belongsToMany(db.Group, { through: 'userGroups' })
db.Group.hasMany(db.Right, { as: 'groupRights' })
db.Document.hasMany(db.Tag, { as: 'documentTags' })
db.File.belongsTo(db.Folder)
db.Comment.belongsTo(db.Document)
db.Comment.belongsTo(db.User, { as: 'author' })
}