<?php

namespace App\Models;

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

class AKI extends Model
{
    use HasFactory;
    protected $table = 'data_aki';

    protected $primaryKey = 'id_data_aki';
    public $incrementing = true;
    protected $fillable = [
        'id_puskesmas',
        'id_kecamatan',
        'id_tahun',
        'aki',
    ];

    public function puskesmas()
    {
        return $this->belongsTo(Puskesmas::class, 'id_puskesmas');
    }
    public function tahun()
    {
        return $this->belongsTo(Tahun::class, 'id_tahun', 'id_tahun');
    }
    public function kecamatan()
    {
        return $this->belongsTo(Kecamatan::class, 'id_kecamatan');
    }
}