<?php

namespace app\Http\Models;

use Illuminate\Database\Eloquent\Model;

class Pemeriksaan extends Model
{
    protected $table = 'pemeriksaan';
    protected $fillable = ['id_pemeriksaan','periode_id','bumil_id','tgl_kunjungan','kunjungan','usia_kehamilan','berat_badan','tinggi_badan','lila','hb','sistole','diastole','faktor_resiko','letak_janin','denyut_jantung_janin','tinggi_fundus','kaki_bengkak','imunisasi_tt','suplemen_fe','protein_hewani','protein_hewani_lain','status','users_id','tanggalSimpan'];
    protected $primaryKey = "id_pemeriksaan";
    public $timestamps = false;

    public function periode(){
        return $this->belongsTo('App\Http\Models\PeriodeKehamilan','periode_id');        
    }

    public function bumil(){
        return $this->belongsTo('App\Http\Models\IbuHamil','bumil_id');        
    }

    public function users(){
        return $this->belongsTo('App\Http\Models\Users','users_id');        
    }
}
