*/ #[ORM\ManyToMany(targetEntity: Clients::class, inversedBy: 'commandes')] private Collection $Client; /** * @var Collection */ #[ORM\OneToMany(targetEntity: DetailsCommande::class, mappedBy: 'Commande')] private Collection $detailsCommandes; /** * @var Collection */ #[ORM\ManyToMany(targetEntity: Plats::class, mappedBy: 'Commande')] private Collection $plats; #[ORM\ManyToOne(inversedBy: 'commandes')] private ?StatutCommandes $StatutCommande = null; public function __construct() { $this->Client = new ArrayCollection(); $this->detailsCommandes = new ArrayCollection(); $this->plats = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDateHeure(): ?\DateTimeInterface { return $this->DateHeure; } public function setDateHeure(\DateTimeInterface $DateHeure): static { $this->DateHeure = $DateHeure; return $this; } public function isStatut(): ?bool { return $this->Statut; } public function setStatut(bool $Statut): static { $this->Statut = $Statut; return $this; } public function getTotal(): ?float { return $this->Total; } public function setTotal(float $Total): static { $this->Total = $Total; return $this; } /** * @return Collection */ public function getClient(): Collection { return $this->Client; } public function addClient(Clients $client): static { if (!$this->Client->contains($client)) { $this->Client->add($client); } return $this; } public function removeClient(Clients $client): static { $this->Client->removeElement($client); return $this; } /** * @return Collection */ public function getDetailsCommandes(): Collection { return $this->detailsCommandes; } public function addDetailsCommande(DetailsCommande $detailsCommande): static { if (!$this->detailsCommandes->contains($detailsCommande)) { $this->detailsCommandes->add($detailsCommande); $detailsCommande->setCommande($this); } return $this; } public function removeDetailsCommande(DetailsCommande $detailsCommande): static { if ($this->detailsCommandes->removeElement($detailsCommande)) { // set the owning side to null (unless already changed) if ($detailsCommande->getCommande() === $this) { $detailsCommande->setCommande(null); } } return $this; } /** * @return Collection */ public function getPlats(): Collection { return $this->plats; } public function addPlat(Plats $plat): static { if (!$this->plats->contains($plat)) { $this->plats->add($plat); $plat->addCommande($this); } return $this; } public function removePlat(Plats $plat): static { if ($this->plats->removeElement($plat)) { $plat->removeCommande($this); } return $this; } public function getStatutCommande(): ?StatutCommandes { return $this->StatutCommande; } public function setStatutCommande(?StatutCommandes $StatutCommande): static { $this->StatutCommande = $StatutCommande; return $this; } }