<?php

namespace App\Models;

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

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

    public function info()
    {
        return $this->hasOne(DataObat::class, 'id', 'vitamin_id');
    }
    public function infov2()
    {
        return $this->hasOne(DataObat::class, 'id', 'imunisasi_id');
    }
}
