<?php

namespace App\Models;

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

class DetailMakanan extends Model
{
    use HasFactory;
    protected $table = 'detail_makanan';
    protected $primaryKey = 'id';
    protected $fillable = [
        'makanan_id',
        'waktu',
        'nama_makanan',
        'berat',
        'kalori',
    ];
    public function makanan()
    {
        return $this->belongsTo(Makanan::class, 'makanan_id');
    }
}
