Texte, Materialart und Präsentationsmedien bleiben am Medium, Modul, Programm und Lizenzartikel und werden von Verwaltung und Karten aus derselben Quelle gelesen, ohne Fassung oder Lizenz zu verändern. Co-authored-by: Cursor <cursoragent@cursor.com>
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Domain\Catalog;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class PresentationRole extends Model
|
|
{
|
|
/** Rollen, deren Herkunft an einer Film- oder Audiofassung festgehalten werden kann. */
|
|
public const BOUND_ROLES = ['trailer', 'vorschauclip', 'audiovorschau'];
|
|
|
|
/** Reihenfolge, in der ein öffentliches Titelbild gesucht wird. */
|
|
public const COVER_ROLES = ['titelbild', 'hero', 'hover', 'titelbild_alternativ', 'galerie'];
|
|
|
|
protected $fillable = [
|
|
'slug',
|
|
'label',
|
|
'multiple',
|
|
'ordered',
|
|
'sort_order',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'multiple' => 'boolean',
|
|
'ordered' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function assignments(): HasMany
|
|
{
|
|
return $this->hasMany(PresentationAssignment::class);
|
|
}
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public static function selectOptions(): array
|
|
{
|
|
return static::query()->orderBy('sort_order')->pluck('label', 'slug')->all();
|
|
}
|
|
}
|