'integer', 'base_price' => 'float', 'is_print_on_demand' => 'boolean', 'is_featured' => 'boolean', 'is_active' => 'boolean', 'print_time_hours' => 'float', 'print_info' => 'array', 'gallery_images' => 'array', 'available_materials' => 'array', 'available_colors' => 'array', ]; public function category(): BelongsTo { return $this->belongsTo(Category::class); } public function makerworldCollection(): BelongsTo { return $this->belongsTo(MakerWorldCollection::class, 'makerworld_collection_id'); } public function orderItems(): HasMany { return $this->hasMany(OrderItem::class); } public function scopePublished(Builder $query): Builder { return $query->where('is_active', true) ->where(function ($q) { $q->where('status', 'published') ->orWhereNull('status'); }); } public function scopeDraft(Builder $query): Builder { return $query->where('status', 'draft'); } public function getFormattedPriceAttribute(): string { return '€ '.number_format((float) ($this->base_price ?? 0), 2, ',', '.'); } }