Files
laraundfelix/app/Domain/Catalog/ContentElement.php
T
LarsandCursor f29ea58fd5
CI Feature / test (push) Successful in 54s
Deploy Test / test (push) Successful in 47s
Deploy Test / deploy (push) Successful in 24s
Ergänze die gemeinsame redaktionelle Basis an den Fachobjekten.
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>
2026-11-19 07:54:36 +01:00

58 lines
1.3 KiB
PHP

<?php
namespace App\Domain\Catalog;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
class ContentElement extends Model
{
protected $fillable = [
'kind',
'output_class',
'working_title',
'display_title',
'teaser',
'description',
'usage_note',
'license_note',
'website_credit',
'website_alt',
'website_released_at',
'website_public_path',
'summary',
'search_terms',
'thumbnail_path',
'thumbnail_alt',
'thumbnail_source',
'thumbnail_error',
'editorial_content_kind_id',
'archived_at',
];
protected function casts(): array
{
return [
'archived_at' => 'datetime',
'website_released_at' => 'datetime',
];
}
public function editorialContentKind(): BelongsTo
{
return $this->belongsTo(EditorialContentKind::class);
}
public function versions(): HasMany
{
return $this->hasMany(ContentElementVersion::class);
}
public function pillars(): BelongsToMany
{
return $this->belongsToMany(Pillar::class)->orderBy('pillars.name');
}
}