mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-04 23:19:42 +00:00
Feed and Setting models
This commit is contained in:
parent
bed3758268
commit
c7f457da3e
10 changed files with 236 additions and 10 deletions
|
|
@ -30,6 +30,10 @@ module.exports = (sequelize) => {
|
|||
})
|
||||
|
||||
const { Book, PodcastEpisode, FileMetadata } = sequelize.models
|
||||
|
||||
FileMetadata.hasOne(AudioTrack)
|
||||
AudioTrack.belongsTo(FileMetadata)
|
||||
|
||||
Book.hasMany(AudioTrack, {
|
||||
foreignKey: 'mediaItemId',
|
||||
constraints: false,
|
||||
|
|
@ -64,8 +68,5 @@ module.exports = (sequelize) => {
|
|||
}
|
||||
})
|
||||
|
||||
FileMetadata.hasOne(AudioTrack)
|
||||
AudioTrack.belongsTo(FileMetadata)
|
||||
|
||||
return AudioTrack
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue