initial commit
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Result extends Model
|
||||
{
|
||||
protected $table = 'result';
|
||||
|
||||
protected $fillable = [
|
||||
'patient_id',
|
||||
'doctor_id',
|
||||
'consultation_id',
|
||||
'jarak_lari',
|
||||
'sleeptime',
|
||||
'food',
|
||||
'unrecommended_food',
|
||||
'notes',
|
||||
];
|
||||
|
||||
public function patient()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'patient_id');
|
||||
}
|
||||
|
||||
public function doctor()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'doctor_id');
|
||||
}
|
||||
|
||||
public function consultation()
|
||||
{
|
||||
return $this->belongsTo(Consultation::class, 'consultation_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user