<?phpnamespace App\Entity;use App\Repository\UserRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=UserRepository::class) */class User{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $nom; /** * @ORM\OneToMany(targetEntity=Service::class, mappedBy="user") */ private $services; /** * @ORM\Column(type="string", length=255) */ private $email; /** * @ORM\Column(type="string", length=255) */ private $phone; /** * @ORM\Column(type="string", length=255) */ private $raison; public function __construct() { $this->services = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } /** * @return Collection<int, Service> */ public function getServices(): Collection { return $this->services; } public function addService(Service $service): self { if (!$this->services->contains($service)) { $this->services[] = $service; $service->setUser($this); } return $this; } public function removeService(Service $service): self { if ($this->services->removeElement($service)) { // set the owning side to null (unless already changed) if ($service->getUser() === $this) { $service->setUser(null); } } return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): self { $this->email = $email; return $this; } public function getPhone(): ?string { return $this->phone; } public function setPhone(string $phone): self { $this->phone = $phone; return $this; } public function getRaison(): ?string { return $this->raison; } public function setRaison(string $raison): self { $this->raison = $raison; return $this; }}