<?php

namespace App;

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

class SystemFood extends Model 
{

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

    use SoftDeletes;

    protected $dates = ['deleted_at'];
    protected $fillable = array('name', 'specialty_id');

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

    public function specialty()
    {
        return $this->belongsTo('App\Specialty');
    }

}