add episode seen history in entry page

This commit is contained in:
X4Lo committed 2024-04-22 17:41:30 +01:00
1 parent cf305cabae
commit dbeb0ee524
11 files changed
+288 -64

No files matched your search

+5
View File
@@ -96,6 +96,11 @@ Episode.belongsTo(Season, { foreignKey: 'season_id' });
Episode.hasMany(EpisodeSeen, { foreignKey: 'episode_id', onDelete: 'CASCADE', });
EpisodeSeen.belongsTo(Episode, { foreignKey: 'episode_id' });
// * ENTRY & EPISODE_SEEN - ONE TO MANY
Entry.hasMany(EpisodeSeen, { foreignKey: 'entry_id', onDelete: 'CASCADE', });
EpisodeSeen.belongsTo(Entry, { foreignKey: 'entry_id' });
// * ----
Franchise.hasMany(Entry, { foreignKey: 'franchise_id' });
Entry.belongsTo(Franchise, { foreignKey: 'franchise_id' });