Additional event informations can be added

This commit is contained in:
2026-08-12 15:01:35 +02:00
parent 554166803b
commit 9581176a0c
28 changed files with 675 additions and 39 deletions
+3
View File
@@ -87,6 +87,7 @@ class Event extends InstancedModel
'vat_pricing_mode',
'tax_exemption_reason',
'tax_exemption_note',
'participation_options',
];
@@ -114,6 +115,8 @@ class Event extends InstancedModel
'tax_liable' => 'boolean',
'vat_rate' => 'integer',
'participation_options' => 'array',
];
public function tenant(): BelongsTo
+7
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,12 @@ 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');
}
public function user()
{
return $this->belongsTo(User::class);
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use App\Scopes\InstancedModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class EventParticipantOption extends InstancedModel
{
protected $table = 'event_participant_options';
protected $fillable = [
'tenant',
'event_id',
'event_participant_id',
'question_key',
'question_label',
'value',
'value_label',
];
public function event(): BelongsTo
{
return $this->belongsTo(Event::class);
}
public function participant(): BelongsTo
{
return $this->belongsTo(EventParticipant::class, 'event_participant_id');
}
}