<?php
declare(strict_types=1);
namespace App\Entity\System;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\System\AdminAclRepository")
*
* @ORM\Table
*/
class AdminAcl
{
/**
* @var int
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var string
*
* @ORM\Column(type="string", length=200, nullable=false, unique=true)
*/
private string $route;
/**
* @var Role[]|ArrayCollection<int, Role>
*
* @ORM\ManyToMany(targetEntity="App\Entity\System\Role", mappedBy="routes")
*/
private $roles;
public function __construct()
{
$this->roles = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function getRoute(): string
{
return $this->route;
}
public function setRoute(string $route): AdminAcl
{
$this->route = $route;
return $this;
}
/**
* @return Role[]|ArrayCollection<int, Role>
*/
public function getRoles()
{
return $this->roles;
}
/**
* @param Role[]|ArrayCollection<int, Role> $roles
*
* @return AdminAcl
*/
public function setRoles($roles)
{
$this->roles = $roles;
return $this;
}
}