/
home
/
obinna
/
html
/
restaurants
/
src
/
Entity
/
Upload File
HOME
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\ArrayCollection; /** * Groups * * @ORM\Table(name="category") * @ORM\Entity(repositoryClass="App\Repository\GroupsRepository") */ class Groups { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=255, unique=false) */ private $name; /** * @var \App\Entity\Item * * @ORM\OneToMany(targetEntity="App\Entity\Item", mappedBy="category") */ private $items; /** * @var int * * @ORM\Column(name="user_id", type="integer", nullable=true) */ private $userId; public function __construct() { $this->items = new ArrayCollection(); } /** * Set userId * * @param int $userId * * @return Groups */ public function setUserId($userId) { $this->userId = $userId; return $this; } /** * Get userId * * @return int */ public function getUserId() { return $this->userId; } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set name * * @param string $name * * @return Groups */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Get name * * @return string */ public function getItems() { return $this->name; } }