Files
app-test-laravel/app/Models/MsDoctor.php
2025-12-02 13:37:26 +07:00

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');
}
}