mirror of
https://github.com/pawelmalak/flame.git
synced 2026-02-28 09:23:12 +08:00
Pin/Delete category
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user