<?php

namespace App\Models;

use App\Models\KriteriaMakanan;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Makanan extends Model
{
    use HasFactory;

    protected $table = 'makanan';
    protected $primaryKey = 'id';
    protected $fillable = [
        'kode',
        'alternatif',
        'kalori'
    ];
    public function kriteria_makanan()
    {
        return $this->hasMany(KriteriaMakanan::class, 'makanan_id');
    }
}
