<?php
namespace App\Entity;
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="menus")
*/
class Menu
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="boolean")
*/
private $isActive;
/**
* @ORM\OneToMany(targetEntity=MenuItem::class, mappedBy="menu", cascade={"persist", "remove"})
*/
private $menuItems;
public function __construct()
{
$this->menuItems = new ArrayCollection();
$this->isActive = true;
}
// Getters and setters...
}