mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
29 lines
587 B
PHP
29 lines
587 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PlaylistItem extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected $casts = [
|
|
'is_active' => 'boolean',
|
|
'last_displayed_at' => 'datetime',
|
|
];
|
|
|
|
public function playlist(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Playlist::class);
|
|
}
|
|
|
|
public function plugin(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Plugin::class);
|
|
}
|
|
}
|