random changes

This commit is contained in:
X4Lo committed 2024-09-10 19:07:43 +01:00
1 parent 5008940c59
commit d06a21097f
7 files changed
+27 -61

No files matched your search

+3 -3
View File
@@ -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', });