affiliations

This commit is contained in:
ghassan committed 2026-01-27 16:34:46 +03:00
1 parent 4f3f9c9aad
commit 0b5b3dd3ee
177 files changed
+9660 -8531

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ClubPackageActivity extends Model
{
protected $fillable = [
'package_id',
'activity_id',
'instructor_id',
];
/**
* Get the package that owns this activity assignment.
*/
public function package(): BelongsTo
{
return $this->belongsTo(ClubPackage::class, 'package_id');
}
/**
* Get the activity.
*/
public function activity(): BelongsTo
{
return $this->belongsTo(ClubActivity::class, 'activity_id');
}
/**
* Get the instructor assigned to this activity.
*/
public function instructor(): BelongsTo
{
return $this->belongsTo(ClubInstructor::class, 'instructor_id');
}
}