Update model casing & associations

This commit is contained in:
advplyr 2023-03-19 15:19:22 -05:00
parent 2131a65299
commit 54ca58e610
45 changed files with 830 additions and 561 deletions

View file

@ -23,12 +23,12 @@ module.exports = (sequelize) => {
publishedAt: DataTypes.DATE
}, {
sequelize,
modelName: 'PodcastEpisode'
modelName: 'podcastEpisode'
})
const { Podcast } = sequelize.models
Podcast.hasMany(PodcastEpisode)
PodcastEpisode.belongsTo(Podcast)
const { podcast } = sequelize.models
podcast.hasMany(PodcastEpisode)
PodcastEpisode.belongsTo(podcast)
return PodcastEpisode
}