<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class PatientECG extends Model
{
    use HasFactory;

  protected $table = 'patient_ecg'; // ?? if table is really singular 
    public $timestamps = false;

    protected $fillable = [
        'ecg_five_lead',
        'ecg_twelve_lead',
        'vitals_id',
    ];  

    protected $casts = [
        'ecg_five_lead' => 'array',
        'ecg_twelve_lead' => 'array',
    ];

    public function vitals()
    {
        return $this->belongsTo(PatientVitals::class, 'vitals_id', 'vital_id');
    }
}
    