refactor: migrate to PostgreSQL + Sequelize
This commit is contained in:
10
server/models/_relations.js
Normal file
10
server/models/_relations.js
Normal file
@@ -0,0 +1,10 @@
|
||||
'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)
|
||||
}
|
Reference in New Issue
Block a user