[#2] work on tv series processing

This commit is contained in:
2025-01-07 23:39:22 +02:00
parent 8f2c48d847
commit da6d92ec65
9 changed files with 210 additions and 3 deletions
+5
View File
@@ -27,4 +27,9 @@ class Episode extends Model
'show_id',
'season_id',
];
protected $casts = [
'crew' => 'array',
'guest_stars' => 'array',
];
}
+3
View File
@@ -18,5 +18,8 @@ class ExternalId extends Model
'facebook_id',
'instagram_id',
'twitter_id',
'tvdb_id',
'freebase_id',
'tvrage_id',
];
}
+10
View File
@@ -45,4 +45,14 @@ class Show extends Model
{
return $this->belongsToMany(Person::class, 'show_crew', 'show_id', 'person_id');
}
public function images()
{
return $this->belongsToMany(Image::class, 'show_images', 'show_id', 'image_id');
}
public function videos()
{
return $this->belongsToMany(Video::class, 'show_videos', 'show_id', 'video_id');
}
}