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:
parent
bd5354a2e3
commit
0f2125e720
8 changed files with 156 additions and 7 deletions
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue