2021-11-20 00:48:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Course\Models;
|
|
|
|
|
2023-10-18 01:11:36 +02:00
|
|
|
use App\Member\Member;
|
2024-09-22 17:32:29 +02:00
|
|
|
use Database\Factories\Course\Models\CourseMemberFactory;
|
2021-11-20 00:48:42 +01:00
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
class CourseMember extends Model
|
|
|
|
{
|
2024-09-22 17:32:29 +02:00
|
|
|
/** @use HasFactory<CourseMemberFactory> */
|
2021-11-20 00:48:42 +01:00
|
|
|
use HasFactory;
|
|
|
|
|
2023-02-17 18:57:11 +01:00
|
|
|
/** @var array<int, string> */
|
2021-11-20 00:48:42 +01:00
|
|
|
public $guarded = [];
|
|
|
|
|
2023-02-17 18:57:11 +01:00
|
|
|
/**
|
|
|
|
* @return BelongsTo<Course, self>
|
|
|
|
*/
|
2021-11-20 00:48:42 +01:00
|
|
|
public function course(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Course::class);
|
|
|
|
}
|
2023-10-18 01:11:36 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return BelongsTo<Member, self>
|
|
|
|
*/
|
|
|
|
public function member(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Member::class);
|
|
|
|
}
|
2021-11-20 00:48:42 +01:00
|
|
|
}
|