1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-24 13:39:35 +02:00

Pin/Delete category

This commit is contained in:
unknown 2021-05-25 14:05:53 +02:00
parent bd5354a2e3
commit 0f2125e720
8 changed files with 156 additions and 7 deletions

View file

@ -3,11 +3,11 @@ const Bookmark = require('./Bookmark');
const associateModels = () => {
// Category <> Bookmark
Bookmark.belongsTo(Category, { foreignKey: 'categoryId' });
Category.hasMany(Bookmark, {
as: 'bookmarks',
foreignKey: 'categoryId'
});
Bookmark.belongsTo(Category, { foreignKey: 'categoryId' });
}
module.exports = associateModels;