2021-06-24 23:48:08 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Member;
|
|
|
|
|
2021-08-22 22:23:17 +02:00
|
|
|
use App\Activity;
|
|
|
|
use App\Subactivity;
|
2021-06-24 23:48:08 +02:00
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2021-08-22 22:23:17 +02:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
2021-06-24 23:48:08 +02:00
|
|
|
|
|
|
|
class Membership extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
2021-08-22 19:31:20 +02:00
|
|
|
public $fillable = ['subactivity_id', 'activity_id', 'group_id', 'member_id', 'nami_id', 'created_at'];
|
2021-08-22 22:23:17 +02:00
|
|
|
|
|
|
|
public function activity(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Activity::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function subactivity(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Subactivity::class);
|
|
|
|
}
|
|
|
|
|
2021-06-24 23:48:08 +02:00
|
|
|
}
|