Link tenant packages to events and show usage in billing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user