Update Series and Author model to be library specific

This commit is contained in:
advplyr 2023-07-08 09:57:32 -05:00
parent 1d13d0a553
commit 0ac63b2678
10 changed files with 119 additions and 61 deletions

View file

@ -74,5 +74,9 @@ module.exports = (sequelize) => {
modelName: 'author'
})
const { library } = sequelize.models
library.hasMany(Author)
Author.belongsTo(library)
return Author
}