34 lines
759 B
PHP
34 lines
759 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\HasOne;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class MsDoctor extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
"name"
|
|
];
|
|
|
|
/**
|
|
* Get the user that owns the doctor
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function msDoctorHealthService(): BelongsTo
|
|
{
|
|
return $this->belongsTo(MsDoctorHealthService::class, 'foreign_key', 'other_key');
|
|
}
|
|
|
|
public function trPatientVisit(): BelongsTo
|
|
{
|
|
return $this->belongsTo(TrPatientVisit::class, 'foreign_key', 'other_key');
|
|
}
|
|
|
|
}
|