22 lines
565 B
PHP
22 lines
565 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SurgicalOperation extends Model
|
|
{
|
|
protected $table = 'mv_surgical_operations';
|
|
protected $primaryKey = 'id';
|
|
|
|
public function medicalHistory(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(MedicalHistory::class, 'medical_history_id', 'id');
|
|
}
|
|
|
|
public function migration(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(MigrationPatient::class, 'migration_patient_id', 'id');
|
|
}
|
|
}
|