src/CoreBundle/Entity/Admin.php
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Traits\UserTrait;
use Doctrine\ORM\Mapping as ORM;
/**
* Admin list.
*/
#[ORM\Table(name: 'admin')]
#[ORM\Entity]
class Admin
{
use UserTrait;
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
protected ?int $id = null;
#[ORM\OneToOne(targetEntity: User::class, inversedBy: 'admin')]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
protected User $user;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
}