Link tenant packages to events and show usage in billing
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-06 12:54:33 +01:00
parent fa114ac0dc
commit 0291d537fb
11 changed files with 572 additions and 51 deletions

View File

@@ -16,6 +16,7 @@ class EventPackage extends Model
protected $fillable = [
'event_id',
'package_id',
'tenant_package_id',
'purchased_price',
'purchased_at',
'used_photos',
@@ -51,6 +52,11 @@ class EventPackage extends Model
return $this->belongsTo(Package::class)->withTrashed();
}
public function tenantPackage(): BelongsTo
{
return $this->belongsTo(TenantPackage::class);
}
public function addons(): HasMany
{
return $this->hasMany(EventPackageAddon::class);