<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class DataPeriksaIbuHamil extends Model
{
    use HasFactory;
    protected $table = 'data_pemeriksaan_ibu_hamil';
    protected $guarded = ['id']; //nggak boleh di isi

    public function dataVitamin()
    {
        return $this->hasOne(DataObat::class, 'id', 'vitamin_id');
    }
    public function dataIbuHamil()
    {
        return $this->hasOne(DataIbuHamil::class, 'id', 'ibu_hamil_id');
    }
}
