<?php

namespace App\Models;

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

class RiwayatPemeriksaan extends Model
{
    use HasFactory;

    protected $table = 'riwayat_pemeriksaans'; // Ensure the table name matches your migration

    protected $fillable = [
        'nik',
        'nama',
        'umur',
        'berat',
        'tinggi',
        'hasil_analisis',
        'tanggal_pemeriksaan',
        'catatan'
    ];

    protected $casts = [
        'tanggal_pemeriksaan' => 'date',
        'berat' => 'float',
        'tinggi' => 'float',
        'umur' => 'integer',
    ];
}
