Files
laraundfelix/app/Domain/Catalog/LicenseArticle.php
T
LarsandClaude Sonnet 5.5 0ac70884cc
CI Feature / test (push) Successful in 5m10s
Deploy Test / test (push) Successful in 5m21s
Deploy Test / deploy (push) Successful in 32s
Zeige auf der Shopkachel Titelbild, Saeulen, Materialart mit Symbol und Marker
- ShopCatalog als gemeinsame Datenquelle der Kacheln, shop/kachel als Partial
- Titelbild nur mit Website-Freigabe (PresentationMedia::coverPresentation), schmueckend mit leerem alt
- Symbol je Materialart (Stammdaten), Marker Neu, Aktualisiert, Beliebt mit Einstellung am Artikel
- Migration 2026_12_01_100000, rein ergaenzend
- ADR-54, Plan, DEPLOYMENT.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-26 07:44:47 +01:00

62 lines
1.5 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 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',
'shop_markers',
];
protected function casts(): array
{
return [
'archived_at' => 'datetime',
'shop_markers' => 'array',
];
}
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);
}
/** Direkt zugeordnete fachliche Säulen (zentrale Säulenverwaltung). */
public function pillars(): BelongsToMany
{
return $this->belongsToMany(Pillar::class)->orderBy('pillars.sort_order')->orderBy('pillars.name');
}
}