affiliations
This commit is contained in:
1 parent
4f3f9c9aad
commit
0b5b3dd3ee
177 files changed
+9660
-8531
No files matched your search
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user