random changes
This commit is contained in:
1 parent
5008940c59
commit
d06a21097f
7 files changed
+27
-61
No files matched your search
@@ -46,7 +46,7 @@ Entry.belongsToMany(UserCollection, {
|
||||
foreignKey: 'entry_id',
|
||||
otherKey: 'user_collection_id',
|
||||
onDelete: 'CASCADE',
|
||||
as: 'userCollections',
|
||||
as: 'collections',
|
||||
});
|
||||
|
||||
UserCollection.belongsToMany(Entry, {
|
||||
@@ -86,8 +86,8 @@ EntryGenre.belongsTo(Genre, { foreignKey: 'genre_id', as: 'genre' });
|
||||
|
||||
|
||||
// * ENTRY & MEDIA - ONE TO MANY
|
||||
Entry.hasMany(Media, { foreignKey: 'entry_id', as: 'medias', onDelete: 'CASCADE', });
|
||||
Media.belongsTo(Entry, { foreignKey: 'entry_id', as: 'entry' });
|
||||
Entry.hasMany(Media, { foreignKey: 'entryId', as: 'medias', onDelete: 'CASCADE', });
|
||||
Media.belongsTo(Entry, { foreignKey: 'entryId', as: 'entry' });
|
||||
|
||||
// * ENTRY & SEASON - ONE TO MANY
|
||||
Entry.hasMany(Season, { foreignKey: 'entry_id', as: 'seasons', onDelete: 'CASCADE', });
|
||||
|
||||
Reference in new issue
Block a user