2024-12-30 01:51:28 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
2025-01-04 03:22:13 +02:00
|
|
|
/**
|
|
|
|
|
* @property int $tmdb_id
|
|
|
|
|
*/
|
2024-12-30 01:51:28 +02:00
|
|
|
class Show extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'adult',
|
|
|
|
|
'backdrop_path',
|
|
|
|
|
'episode_run_time',
|
|
|
|
|
'first_air_date',
|
|
|
|
|
'homepage',
|
|
|
|
|
'tmdb_id',
|
|
|
|
|
'in_production',
|
|
|
|
|
'languages',
|
|
|
|
|
'last_air_date',
|
|
|
|
|
'name',
|
|
|
|
|
'slug',
|
|
|
|
|
'number_of_episodes',
|
|
|
|
|
'number_of_seasons',
|
|
|
|
|
'origin_country',
|
|
|
|
|
'original_language',
|
|
|
|
|
'original_name',
|
|
|
|
|
'overview',
|
|
|
|
|
'popularity',
|
|
|
|
|
'poster_path',
|
|
|
|
|
'status',
|
|
|
|
|
'tagline',
|
|
|
|
|
'type',
|
|
|
|
|
'vote_average',
|
|
|
|
|
'vote_count',
|
|
|
|
|
];
|
2025-01-04 04:02:10 +02:00
|
|
|
|
|
|
|
|
public function castList()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsToMany(Person::class, 'show_cast', 'show_id', 'person_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function crewList()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsToMany(Person::class, 'show_crew', 'show_id', 'person_id');
|
|
|
|
|
}
|
2024-12-30 01:51:28 +02:00
|
|
|
}
|