Update Active Status and Fix Mode 3

This commit is contained in:
2022-07-25 12:24:55 +07:00
parent d7de76798e
commit 2493e7fd2a
14 changed files with 118 additions and 14 deletions

34
app/Models/MemberPlan.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
namespace App\Models;
use App\Traits\Blameable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class MemberPlan extends Model
{
use HasFactory, SoftDeletes, Blameable;
protected $fillable = [
'member_id',
'plan_id',
'status',
'start',
'end',
'created_by',
'updated_by',
'deleted_by',
];
public function member()
{
return $this->belongsTo(Member::class, 'member_id', 'member_id');
}
public function corporatePlan()
{
return $this->belongsTo(CorporatePlan::class, 'plan_id', 'code');
}
}