*/ use HasFactory; protected $fillable = [ 'product_id', 'wood_species', 'origin_country', 'origin_region', 'harvest_year', 'forest_operator', 'sustainability_certificate', 'eudr_reference_id', ]; protected function casts(): array { return [ 'harvest_year' => 'integer', ]; } /** * Gehört zu einem Produkt. */ public function product(): BelongsTo { return $this->belongsTo(Product::class); } /** * EUDR-Dokumente (polymorphe Beziehung via Media). */ public function media(): MorphMany { return $this->morphMany(Media::class, 'model'); } }