<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Patient;
class PatientConsent extends Model
{
    use HasFactory;
    protected $table = 'patient_consents';
    protected $primaryKey = 'consent_id';

    protected $fillable = [
        'consent_type',
        'consent_status',
        'consent_date',
    ];


    public function getPatient(){
     
        return $this->belongsTo([Patient::class, 'patient_id','consent_id']); 
    }
}
