[#2] work on tv series processing
This commit is contained in:
@@ -27,4 +27,9 @@ class Episode extends Model
|
||||
'show_id',
|
||||
'season_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'crew' => 'array',
|
||||
'guest_stars' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -18,5 +18,8 @@ class ExternalId extends Model
|
||||
'facebook_id',
|
||||
'instagram_id',
|
||||
'twitter_id',
|
||||
'tvdb_id',
|
||||
'freebase_id',
|
||||
'tvrage_id',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user