src/Entity/Users.php line 13
<?phpnamespace App\Entity;use App\Repository\UsersRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;use Symfony\Component\Security\Core\User\UserInterface;#[ORM\Entity(repositoryClass: UsersRepository::class)]class Users implements UserInterface, PasswordAuthenticatedUserInterface{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 180, unique: true)]private ?string $username = null;#[ORM\Column]private array $roles = [];/*** @var string The hashed password*/#[ORM\Column]private ?string $password = null;#[ORM\Column(length: 50)]private ?string $firstName = null;#[ORM\Column(length: 50)]private ?string $lastName = null;#[ORM\Column(length: 255)]private ?string $email = null;#[ORM\Column]private ?bool $valid = null;#[ORM\Column(length: 20)]private ?string $locale = null;#[ORM\Column]private ?int $maxRequest = null;#[ORM\ManyToOne(inversedBy: 'users')]#[ORM\JoinColumn(nullable: false)]private ?Profile $profile = null;#[ORM\ManyToOne(inversedBy: 'users')]#[ORM\JoinColumn(nullable: false)]private ?Zone $zone = null;#[ORM\Column(length: 10, nullable: true)]private ?string $codeAuth = null;#[ORM\OneToMany(mappedBy: 'users', targetEntity: Event::class)]private $events;public function __construct(){}public function getId(): ?int{return $this->id;}public function getUsername(): ?string{return $this->username;}public function setUsername(string $username): self{$this->username = $username;return $this;}/*** A visual identifier that represents this user.** @see UserInterface*/public function getUserIdentifier(): string{return (string) $this->username;}/*** @see UserInterface*/public function getRoles(): array{$roles = $this->roles;// guarantee every user at least has ROLE_USER$roles[] = 'ROLE_USER';return array_unique($roles);}public function setRoles(array $roles): self{$this->roles = $roles;return $this;}/*** @see PasswordAuthenticatedUserInterface*/public function getPassword(): string{return $this->password;}public function setPassword(string $password): self{$this->password = $password;return $this;}/*** @see UserInterface*/public function eraseCredentials(){// If you store any temporary, sensitive data on the user, clear it here// $this->plainPassword = null;}public function getFirstName(): ?string{return $this->firstName;}public function setFirstName(string $firstName): self{$this->firstName = $firstName;return $this;}public function getLastName(): ?string{return $this->lastName;}public function setLastName(string $lastName): self{$this->lastName = $lastName;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(string $email): self{$this->email = $email;return $this;}public function isValid(): ?bool{return $this->valid;}public function setValid(bool $valid): self{$this->valid = $valid;return $this;}public function getLocale(): ?string{return $this->locale;}public function setLocale(string $locale): self{$this->locale = $locale;return $this;}public function getMaxRequest(): ?int{return $this->maxRequest;}public function setMaxRequest(int $maxRequest): self{$this->maxRequest = $maxRequest;return $this;}public function getProfile(): ?Profile{return $this->profile;}public function setProfile(?Profile $profile): self{$this->profile = $profile;return $this;}public function getZone(): ?Zone{return $this->zone;}public function setZone(?Zone $zone): self{$this->zone = $zone;return $this;}public function getCodeAuth(): ?string{return $this->codeAuth;}public function setCodeAuth(?string $codeAuth): self{$this->codeAuth = $codeAuth;return $this;}}