2024-12-30 22:41:34 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class MediaList extends Model
|
|
|
|
|
{
|
2025-01-26 21:36:05 +02:00
|
|
|
public const WATCHLIST = 'Watchlist';
|
|
|
|
|
public const COLLECTION = 'Collection';
|
|
|
|
|
public const WATCHED = 'Watched';
|
|
|
|
|
public const LIKED = 'Liked';
|
|
|
|
|
|
|
|
|
|
public const SPECIAL_LISTS = [
|
|
|
|
|
self::WATCHLIST,
|
|
|
|
|
self::COLLECTION,
|
|
|
|
|
self::WATCHED,
|
|
|
|
|
self::LIKED,
|
|
|
|
|
];
|
|
|
|
|
|
2024-12-30 22:41:34 +02:00
|
|
|
protected $fillable = [
|
|
|
|
|
'description',
|
|
|
|
|
'favorites_count',
|
|
|
|
|
'tmdb_id',
|
|
|
|
|
'item_count',
|
|
|
|
|
'iso_639_1',
|
|
|
|
|
'iso_3166_1',
|
|
|
|
|
'list_type',
|
|
|
|
|
'name',
|
2025-01-26 21:36:05 +02:00
|
|
|
'slug',
|
2024-12-30 22:41:34 +02:00
|
|
|
'poster_path',
|
2025-01-26 21:36:05 +02:00
|
|
|
'user_id',
|
2026-03-08 13:03:14 +02:00
|
|
|
'public',
|
2024-12-30 22:41:34 +02:00
|
|
|
];
|
2026-03-08 13:03:14 +02:00
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(User::class);
|
|
|
|
|
}
|
2024-12-30 22:41:34 +02:00
|
|
|
}
|