src/Entity/Tierpayant.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TierpayantRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TierpayantRepository::class)
  9.  */
  10. class Tierpayant
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $designation;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $logo;
  26.     /**
  27.      * @ORM\Column(type="text", nullable=true)
  28.      */
  29.     private $description;
  30.     /**
  31.      * @ORM\ManyToMany(targetEntity=IctusPharmacie::class, inversedBy="tierpayants")
  32.      */
  33.     private $pharmacie;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="tierpayant")
  36.      */
  37.     private $ictusCommandes;
  38.     public function __construct()
  39.     {
  40.         $this->pharmacie = new ArrayCollection();
  41.         $this->ictusCommandes = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getDesignation(): ?string
  48.     {
  49.         return $this->designation;
  50.     }
  51.     public function setDesignation(string $designation): self
  52.     {
  53.         $this->designation $designation;
  54.         return $this;
  55.     }
  56.     public function getLogo(): ?string
  57.     {
  58.         return $this->logo;
  59.     }
  60.     public function setLogo(?string $logo): self
  61.     {
  62.         $this->logo $logo;
  63.         return $this;
  64.     }
  65.     public function getDescription(): ?string
  66.     {
  67.         return $this->description;
  68.     }
  69.     public function setDescription(?string $description): self
  70.     {
  71.         $this->description $description;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return Collection<int, IctusPharmacie>
  76.      */
  77.     public function getPharmacie(): Collection
  78.     {
  79.         return $this->pharmacie;
  80.     }
  81.     public function addPharmacie(IctusPharmacie $pharmacie): self
  82.     {
  83.         if (!$this->pharmacie->contains($pharmacie)) {
  84.             $this->pharmacie[] = $pharmacie;
  85.         }
  86.         return $this;
  87.     }
  88.     public function removePharmacie(IctusPharmacie $pharmacie): self
  89.     {
  90.         $this->pharmacie->removeElement($pharmacie);
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return Collection<int, IctusCommande>
  95.      */
  96.     public function getIctusCommandes(): Collection
  97.     {
  98.         return $this->ictusCommandes;
  99.     }
  100.     public function addIctusCommande(IctusCommande $ictusCommande): self
  101.     {
  102.         if (!$this->ictusCommandes->contains($ictusCommande)) {
  103.             $this->ictusCommandes[] = $ictusCommande;
  104.             $ictusCommande->setTierpayant($this);
  105.         }
  106.         return $this;
  107.     }
  108.     public function removeIctusCommande(IctusCommande $ictusCommande): self
  109.     {
  110.         if ($this->ictusCommandes->removeElement($ictusCommande)) {
  111.             // set the owning side to null (unless already changed)
  112.             if ($ictusCommande->getTierpayant() === $this) {
  113.                 $ictusCommande->setTierpayant(null);
  114.             }
  115.         }
  116.         return $this;
  117.     }
  118. }