[#2] some progress

This commit is contained in:
2025-01-09 16:01:38 +02:00
parent 300c2574ea
commit bbd082fd8f
11 changed files with 265 additions and 8 deletions
+30
View File
@@ -41,6 +41,36 @@ class ItemToFetchJobs extends Model
self::JOB_CONTENT_RATINGS,
];
public const MOVIE_JOBS = [
self::JOB_ALTERNVATIVE_TITLES,
self::JOB_CREDITS,
self::JOB_IMAGES,
self::JOB_KEYWORDS,
self::JOB_RELEASES,
self::JOB_TRANSLATIONS,
self::JOB_SIMILAR,
self::JOB_RECOMMNDATION,
self::JOB_REVIEWS,
self::JOB_LISTS,
self::JOB_VIDEOS,
self::JOB_WATCH_PROVIDERS,
self::JOB_EXTERNAL_IDS,
];
public const SHOW_JOBS = [
self::JOB_ALTERNVATIVE_TITLES,
self::JOB_CREDITS,
self::JOB_IMAGES,
self::JOB_KEYWORDS,
self::JOB_TRANSLATIONS,
self::JOB_SIMILAR,
self::JOB_RECOMMNDATION,
self::JOB_VIDEOS,
self::JOB_WATCH_PROVIDERS,
self::JOB_EXTERNAL_IDS,
self::JOB_CONTENT_RATINGS,
];
protected $fillable = [
'tmdb_id',
'item_id',
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ProductionCompany extends Model
{
protected $fillable = [
'tmdb_id',
'logo_path',
'name',
'origin_country',
];
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ProductionCountry extends Model
{
protected $fillable = [
'iso_3166',
'name',
];
}
+10
View File
@@ -80,4 +80,14 @@ class Show extends Model
{
return $this->belongsToMany(Network::class, 'show_networks', 'show_id', 'network_id');
}
public function productionCompanies()
{
return $this->belongsToMany(ProductionCompany::class, 'show_production_companies', 'show_id', 'production_company_id');
}
public function productionCountries()
{
return $this->belongsToMany(ProductionCountry::class, 'show_production_countries', 'show_id', 'production_country_id');
}
}