diff --git a/src/Entity/User.php b/src/Entity/User.php index a775c90..a8e1f3c 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -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; + } }