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>
53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Domain\Catalog;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class LicenseArticle extends Model
|
|
{
|
|
protected $fillable = [
|
|
'code',
|
|
'working_title',
|
|
'display_title',
|
|
'teaser',
|
|
'summary',
|
|
'description',
|
|
'search_terms',
|
|
'editorial_content_kind_id',
|
|
'product_line',
|
|
'successor_of_id',
|
|
'current_release_id',
|
|
'archived_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'archived_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function releases(): HasMany
|
|
{
|
|
return $this->hasMany(ArticleRelease::class);
|
|
}
|
|
|
|
public function currentRelease(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ArticleRelease::class, 'current_release_id');
|
|
}
|
|
|
|
public function successorOf(): BelongsTo
|
|
{
|
|
return $this->belongsTo(self::class, 'successor_of_id');
|
|
}
|
|
|
|
public function editorialContentKind(): BelongsTo
|
|
{
|
|
return $this->belongsTo(EditorialContentKind::class);
|
|
}
|
|
}
|