2024-10-16 20:43:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use App\Repository\UtilisateursRepository;
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
#[ORM\Entity(repositoryClass: UtilisateursRepository::class)]
|
|
|
|
class Utilisateurs
|
|
|
|
{
|
|
|
|
#[ORM\Id]
|
|
|
|
#[ORM\GeneratedValue]
|
|
|
|
#[ORM\Column]
|
|
|
|
private ?int $id = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Nom = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Prenom = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Mail = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $MotDePasse = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Role = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var Collection<int, Reservations>
|
|
|
|
*/
|
|
|
|
#[ORM\ManyToMany(targetEntity: Reservations::class, inversedBy: 'utilisateurs')]
|
|
|
|
private Collection $Reservation;
|
|
|
|
|
2024-10-17 16:34:44 +02:00
|
|
|
/**
|
|
|
|
* @var Collection<int, Tables>
|
|
|
|
*/
|
|
|
|
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'utilisateurs')]
|
|
|
|
private Collection $tabl;
|
|
|
|
|
2024-10-16 20:43:05 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->Reservation = new ArrayCollection();
|
2024-10-17 16:34:44 +02:00
|
|
|
$this->tabl = new ArrayCollection();
|
2024-10-16 20:43:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getId(): ?int
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getNom(): ?string
|
|
|
|
{
|
|
|
|
return $this->Nom;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setNom(string $Nom): static
|
|
|
|
{
|
|
|
|
$this->Nom = $Nom;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPrenom(): ?string
|
|
|
|
{
|
|
|
|
return $this->Prenom;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setPrenom(string $Prenom): static
|
|
|
|
{
|
|
|
|
$this->Prenom = $Prenom;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getMail(): ?string
|
|
|
|
{
|
|
|
|
return $this->Mail;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setMail(string $Mail): static
|
|
|
|
{
|
|
|
|
$this->Mail = $Mail;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getMotDePasse(): ?string
|
|
|
|
{
|
|
|
|
return $this->MotDePasse;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setMotDePasse(string $MotDePasse): static
|
|
|
|
{
|
|
|
|
$this->MotDePasse = $MotDePasse;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRole(): ?string
|
|
|
|
{
|
|
|
|
return $this->Role;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setRole(string $Role): static
|
|
|
|
{
|
|
|
|
$this->Role = $Role;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Collection<int, Reservations>
|
|
|
|
*/
|
|
|
|
public function getReservation(): Collection
|
|
|
|
{
|
|
|
|
return $this->Reservation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addReservation(Reservations $reservation): static
|
|
|
|
{
|
|
|
|
if (!$this->Reservation->contains($reservation)) {
|
|
|
|
$this->Reservation->add($reservation);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function removeReservation(Reservations $reservation): static
|
|
|
|
{
|
|
|
|
$this->Reservation->removeElement($reservation);
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
2024-10-17 16:34:44 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Collection<int, Tables>
|
|
|
|
*/
|
|
|
|
public function getTabl(): Collection
|
|
|
|
{
|
|
|
|
return $this->tabl;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addTabl(Tables $tabl): static
|
|
|
|
{
|
|
|
|
if (!$this->tabl->contains($tabl)) {
|
|
|
|
$this->tabl->add($tabl);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function removeTabl(Tables $tabl): static
|
|
|
|
{
|
|
|
|
$this->tabl->removeElement($tabl);
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
2024-10-16 20:43:05 +02:00
|
|
|
}
|