23 lines
496 B
PHP
23 lines
496 B
PHP
<?php
|
|
|
|
namespace Catalyst\APIBundle\Entity;
|
|
|
|
use Catalyst\AuthBundle\Entity\Role as BaseRole;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="api_role")
|
|
* @UniqueEntity("id")
|
|
* @UniqueEntity("name")
|
|
*/
|
|
class Role extends BaseRole
|
|
{
|
|
/**
|
|
* @ORM\ManyToMany(targetEntity="User", mappedBy="roles", fetch="EXTRA_LAZY")
|
|
*/
|
|
protected $users;
|
|
}
|