<?php

namespace App\Models;

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

class MakananKomponenWaktu extends Model
{
    use HasFactory;

    protected $table = 'makanan_komponen_waktu';

    protected $fillable = ['makanan_id', 'komponen_id', 'waktu_makan_id'];

    public function makanan()
    {
        return $this->belongsTo(Makanan::class);
    }

    public function komponen()
    {
        return $this->belongsTo(Komponen::class);
    }

    public function waktuMakan()
    {
        return $this->belongsTo(WaktuMakan::class);
    }
}
