Eine Fassung bleibt nummeriert und kann deaktiviert werden. Beschreibung und fachliche Säulen gehören zum Medium und legen keine neue Fassung an. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
743 B
PHP
36 lines
743 B
PHP
<?php
|
|
|
|
namespace App\Domain\Catalog;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class ContentElement extends Model
|
|
{
|
|
protected $fillable = [
|
|
'kind',
|
|
'output_class',
|
|
'working_title',
|
|
'description',
|
|
'archived_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'archived_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function versions(): HasMany
|
|
{
|
|
return $this->hasMany(ContentElementVersion::class);
|
|
}
|
|
|
|
public function pillars(): BelongsToMany
|
|
{
|
|
return $this->belongsToMany(Pillar::class)->orderBy('pillars.name');
|
|
}
|
|
}
|