2024-10-16 20:43:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use App\Repository\ClientsRepository;
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
#[ORM\Entity(repositoryClass: ClientsRepository::class)]
|
|
|
|
class Clients
|
|
|
|
{
|
|
|
|
#[ORM\Id]
|
|
|
|
#[ORM\GeneratedValue]
|
|
|
|
#[ORM\Column]
|
|
|
|
private ?int $id = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Prenom = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Nom = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Email = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255)]
|
|
|
|
private ?string $Telephone = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var Collection<int, Tables>
|
|
|
|
*/
|
|
|
|
#[ORM\ManyToMany(targetEntity: Tables::class, inversedBy: 'Tabl')]
|
|
|
|
private Collection $Tabl;
|
|
|
|
|
2024-10-17 16:34:44 +02:00
|
|
|
/**
|
|
|
|
* @var Collection<int, Commandes>
|
|
|
|
*/
|
|
|
|
#[ORM\ManyToMany(targetEntity: Commandes::class, mappedBy: 'Client')]
|
|
|
|
private Collection $commandes;
|
|
|
|
|
2024-10-16 20:43:05 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->Tabl = new ArrayCollection();
|
2024-10-17 16:34:44 +02:00
|
|
|
$this->commandes = new ArrayCollection();
|
2024-10-16 20:43:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getId(): ?int
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPrenom(): ?string
|
|
|
|
{
|
|
|
|
return $this->Prenom;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setPrenom(string $Prenom): static
|
|
|
|
{
|
|
|
|
$this->Prenom = $Prenom;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getNom(): ?string
|
|
|
|
{
|
|
|
|
return $this->Nom;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setNom(string $Nom): static
|
|
|
|
{
|
|
|
|
$this->Nom = $Nom;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getEmail(): ?string
|
|
|
|
{
|
|
|
|
return $this->Email;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setEmail(string $Email): static
|
|
|
|
{
|
|
|
|
$this->Email = $Email;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTelephone(): ?string
|
|
|
|
{
|
|
|
|
return $this->Telephone;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setTelephone(string $Telephone): static
|
|
|
|
{
|
|
|
|
$this->Telephone = $Telephone;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @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-17 16:34:44 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return Collection<int, Commandes>
|
|
|
|
*/
|
|
|
|
public function getCommandes(): Collection
|
|
|
|
{
|
|
|
|
return $this->commandes;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addCommande(Commandes $commande): static
|
|
|
|
{
|
|
|
|
if (!$this->commandes->contains($commande)) {
|
|
|
|
$this->commandes->add($commande);
|
|
|
|
$commande->addClient($this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function removeCommande(Commandes $commande): static
|
|
|
|
{
|
|
|
|
if ($this->commandes->removeElement($commande)) {
|
|
|
|
$commande->removeClient($this);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
2024-10-16 20:43:05 +02:00
|
|
|
}
|