Event addons bookable

This commit is contained in:
2026-08-12 16:45:02 +02:00
parent e95de52768
commit 0ee952212b
25 changed files with 656 additions and 24 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
namespace App\Models;
use App\Casts\AmountCast;
use App\Scopes\InstancedModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class EventParticipantAddon extends InstancedModel
{
protected $table = 'event_participant_addons';
protected $fillable = [
'tenant',
'event_id',
'event_participant_id',
'addon_key',
'title',
'price',
'flat',
'days',
'amount',
];
protected $casts = [
'flat' => 'boolean',
'days' => 'integer',
'price' => AmountCast::class,
'amount' => AmountCast::class,
];
public function event(): BelongsTo
{
return $this->belongsTo(Event::class);
}
public function participant(): BelongsTo
{
return $this->belongsTo(EventParticipant::class, 'event_participant_id');
}
}