add pseudo

This commit is contained in:
Olivier PARPAILLON
2024-11-19 14:34:37 +01:00
parent ff1f551726
commit dc01c2e216
7 changed files with 83 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: ParticipantRepository::class)]
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_EMAIL', fields: ['email'])]
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_PSEUDO', fields: ['pseudo'])]
class Participant implements UserInterface, PasswordAuthenticatedUserInterface
{
#[ORM\Id]
@@ -26,6 +27,9 @@ class Participant implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(length: 255)]
private ?string $prenom = null;
#[ORM\Column(length: 255, nullable: false)]
private ?string $pseudo = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $telephone = null;
@@ -76,6 +80,17 @@ class Participant implements UserInterface, PasswordAuthenticatedUserInterface
return $this;
}
public function getPseudo(): ?string
{
return $this->pseudo;
}
public function setPseudo(string $pseudo): self
{
$this->pseudo = $pseudo;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;