<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Meal extends Model 
{

    protected $table = 'meals';
    public $timestamps = true;

    use SoftDeletes;

    protected $dates = ['deleted_at'];
    protected $fillable = array('name', 'type', 'image', 'calories', 'fats', 'carbohydrates', 'protein', 'glycemic');

    public function system()
    {
        return $this->belongsToMany('App\SystemFoodMeal','system_foods_meals','meal_id','system_food_id');
    }

}