42 lines
769 B
PHP
42 lines
769 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Claim extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'code',
|
|
'member_id',
|
|
'diagnosis_id',
|
|
'total_claim',
|
|
'currency',
|
|
'plan_id',
|
|
'benefit_id',
|
|
];
|
|
|
|
public function member()
|
|
{
|
|
return $this->belongsTo(Member::class, 'member_id');
|
|
}
|
|
|
|
public function diagnosis()
|
|
{
|
|
return $this->belongsTo(Icd::class, 'diagnosis_id');
|
|
}
|
|
|
|
public function plan()
|
|
{
|
|
return $this->belongsTo(Plan::class, 'plan_id');
|
|
}
|
|
|
|
public function benefit()
|
|
{
|
|
return $this->belongsTo(Benefit::class, 'benefit_id');
|
|
}
|
|
}
|