Update model casing & associations

This commit is contained in:
advplyr 2023-03-19 15:19:22 -05:00
parent 2131a65299
commit 54ca58e610
45 changed files with 830 additions and 561 deletions

View file

@ -15,13 +15,13 @@ module.exports = (sequelize) => {
end: DataTypes.FLOAT
}, {
sequelize,
modelName: 'BookChapter'
modelName: 'bookChapter'
})
const { Book } = sequelize.models
const { book } = sequelize.models
Book.hasMany(BookChapter)
BookChapter.belongsTo(Book)
book.hasMany(BookChapter)
BookChapter.belongsTo(book)
return BookChapter
}