Handling of event addons

This commit is contained in:
2026-08-12 17:18:45 +02:00
parent 085299336e
commit 6e4e6b645c
74 changed files with 3072 additions and 95 deletions
+13
View File
@@ -14,6 +14,7 @@ use App\EventPaymentModules\DTO\RegistrationSummaryResponse;
use App\EventPaymentModules\EventPaymentModule;
use App\EventPaymentModules\EventPaymentModuleRegistry;
use App\Scopes\InstancedModel;
use Illuminate\Database\Eloquent\Relations\HasMany;
class EventParticipant extends InstancedModel
@@ -103,6 +104,18 @@ class EventParticipant extends InstancedModel
return $this->belongsTo(Event::class);
}
/** Gewählte Teilnahmeoptionen (event-spezifische Pflicht-Auswahl) dieser Anmeldung. */
public function selectedOptions(): HasMany
{
return $this->hasMany(EventParticipantOption::class, 'event_participant_id');
}
/** Gebuchte Zusätze (Event-Addons) dieser Anmeldung. */
public function selectedAddons(): HasMany
{
return $this->hasMany(EventParticipantAddon::class, 'event_participant_id');
}
public function user()
{
return $this->belongsTo(User::class);