<?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', 'code', 'specialty_id');

    public function meals()
    {
        return $this->belongsToMany('App\SystemFoodMeal');
    }

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

}