<?php

namespace AppBundle\Entity;

use ApiPlatform\Metadata\ApiProperty;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;

class Cuisine
{
    /**
     * @var int
     */
    #[Groups(['restaurant'])]
    private $id;

    /**
     * @var string The name of the item
     */
    #[Assert\Type(type: 'string')]
    #[ApiProperty(types: ['http://schema.org/name'])]
    #[Groups(['restaurant'])]
    protected $name;

    protected $restaurants;

    public function __construct()
    {
        $this->restaurants = new ArrayCollection();
    }

    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Sets name.
     *
     * @param string $name
     *
     * @return $this
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Gets name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @return mixed
     */
    public function getRestaurants()
    {
        return $this->restaurants;
    }

    /**
     * @param mixed $restaurants
     *
     * @return self
     */
    public function setRestaurants($restaurants)
    {
        $this->restaurants = $restaurants;

        return $this;
    }
}
