<?phpnamespace App\Entity;use App\Repository\IctusTypeLivraisonRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=IctusTypeLivraisonRepository::class) */class IctusTypeLivraison{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $designation; /** * @ORM\OneToMany(targetEntity=LivraisonPharmacie::class, mappedBy="ictus_type_livraison") */ private $livraisonPharmacies; /** * @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="typeLivraison") */ private $ictusCommandes; /** * @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="typeLivraison") */ private $commandeSpecials; /** * @ORM\OneToMany(targetEntity=User::class, mappedBy="lastTypeLivraison") */ private $users; public function __construct() { $this->livraisonPharmacies = new ArrayCollection(); $this->ictusCommandes = new ArrayCollection(); $this->commandeSpecials = new ArrayCollection(); $this->users = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDesignation(): ?string { return $this->designation; } public function setDesignation(string $designation): self { $this->designation = $designation; return $this; } /** * @return Collection<int, LivraisonPharmacie> */ public function getLivraisonPharmacies(): Collection { return $this->livraisonPharmacies; } public function addLivraisonPharmacy(LivraisonPharmacie $livraisonPharmacy): self { if (!$this->livraisonPharmacies->contains($livraisonPharmacy)) { $this->livraisonPharmacies[] = $livraisonPharmacy; $livraisonPharmacy->setIctusTypeLivraison($this); } return $this; } public function removeLivraisonPharmacy(LivraisonPharmacie $livraisonPharmacy): self { if ($this->livraisonPharmacies->removeElement($livraisonPharmacy)) { // set the owning side to null (unless already changed) if ($livraisonPharmacy->getIctusTypeLivraison() === $this) { $livraisonPharmacy->setIctusTypeLivraison(null); } } return $this; } /** * @return Collection<int, IctusCommande> */ public function getIctusCommandes(): Collection { return $this->ictusCommandes; } public function addIctusCommande(IctusCommande $ictusCommande): self { if (!$this->ictusCommandes->contains($ictusCommande)) { $this->ictusCommandes[] = $ictusCommande; $ictusCommande->setTypeLivraison($this); } return $this; } public function removeIctusCommande(IctusCommande $ictusCommande): self { if ($this->ictusCommandes->removeElement($ictusCommande)) { // set the owning side to null (unless already changed) if ($ictusCommande->getTypeLivraison() === $this) { $ictusCommande->setTypeLivraison(null); } } return $this; } /** * @return Collection<int, CommandeSpecial> */ public function getCommandeSpecials(): Collection { return $this->commandeSpecials; } public function addCommandeSpecial(CommandeSpecial $commandeSpecial): self { if (!$this->commandeSpecials->contains($commandeSpecial)) { $this->commandeSpecials[] = $commandeSpecial; $commandeSpecial->setTypeLivraison($this); } return $this; } public function removeCommandeSpecial(CommandeSpecial $commandeSpecial): self { if ($this->commandeSpecials->removeElement($commandeSpecial)) { // set the owning side to null (unless already changed) if ($commandeSpecial->getTypeLivraison() === $this) { $commandeSpecial->setTypeLivraison(null); } } return $this; } /** * @return Collection<int, User> */ public function getUsers(): Collection { return $this->users; } public function addUser(User $user): self { if (!$this->users->contains($user)) { $this->users[] = $user; $user->setLastTypeLivraison($this); } return $this; } public function removeUser(User $user): self { if ($this->users->removeElement($user)) { // set the owning side to null (unless already changed) if ($user->getLastTypeLivraison() === $this) { $user->setLastTypeLivraison(null); } } return $this; }}