added avatar

This commit is contained in:
tracer 2022-04-12 19:03:07 +02:00
parent f62f5b76d6
commit e3ff36f2ba
1 changed files with 17 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use PhpParser\Node\Scalar\String_;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
@ -45,6 +46,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\ManyToMany(targetEntity: Projects::class, mappedBy: 'developer')]
private $projects;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $avatar;
public function __construct()
{
$this->projects = new ArrayCollection();
@ -205,4 +209,17 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
return $this;
}
public function getAvatar(): string
{
return $this->avatar ?? '';
}
public function setAvatar(?string $avatar): self
{
$this->avatar = $avatar;
return $this;
}
}