src/Entity/Ordonnance.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OrdonnanceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=OrdonnanceRepository::class)
  9.  */
  10. class Ordonnance
  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 $titre;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $fichier;
  26.     /**
  27.      * @ORM\ManyToMany(targetEntity=IctusCommande::class, mappedBy="Ordonnance")
  28.      */
  29.     private $ictusCommandes;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="ordonnances")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private $propriertaire;
  35.     /**
  36.      * @ORM\OneToMany(targetEntity=IctusPanierPatient::class, mappedBy="ordonnance")
  37.      */
  38.     private $ictusPanierPatients;
  39.     /**
  40.      * @ORM\OneToMany(targetEntity=IctusCommandeLine::class, mappedBy="ordonnance")
  41.      */
  42.     private $ictusCommandeLines;
  43.     /**
  44.      * @ORM\OneToMany(targetEntity=IctusPanierSpecial::class, mappedBy="ordonnance")
  45.      */
  46.     private $ictusPanierSpecials;
  47.     /**
  48.      * @ORM\OneToMany(targetEntity=CommandeSpecialLine::class, mappedBy="ordonnance")
  49.      */
  50.     private $commandeSpecialLines;
  51.     public function __construct()
  52.     {
  53.         $this->ictusCommandes = new ArrayCollection();
  54.         $this->ictusPanierPatients = new ArrayCollection();
  55.         $this->ictusCommandeLines = new ArrayCollection();
  56.         $this->ictusPanierSpecials = new ArrayCollection();
  57.         $this->commandeSpecialLines = new ArrayCollection();
  58.     }
  59.     public function getId(): ?int
  60.     {
  61.         return $this->id;
  62.     }
  63.     public function getTitre(): ?string
  64.     {
  65.         return $this->titre;
  66.     }
  67.     public function setTitre(string $titre): self
  68.     {
  69.         $this->titre $titre;
  70.         return $this;
  71.     }
  72.     public function getFichier(): ?string
  73.     {
  74.         return $this->fichier;
  75.     }
  76.     public function setFichier(string $fichier): self
  77.     {
  78.         $this->fichier $fichier;
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return Collection<int, IctusCommande>
  83.      */
  84.     public function getIctusCommandes(): Collection
  85.     {
  86.         return $this->ictusCommandes;
  87.     }
  88.     public function addIctusCommande(IctusCommande $ictusCommande): self
  89.     {
  90.         if (!$this->ictusCommandes->contains($ictusCommande)) {
  91.             $this->ictusCommandes[] = $ictusCommande;
  92.             $ictusCommande->addOrdonnance($this);
  93.         }
  94.         return $this;
  95.     }
  96.     public function removeIctusCommande(IctusCommande $ictusCommande): self
  97.     {
  98.         if ($this->ictusCommandes->removeElement($ictusCommande)) {
  99.             $ictusCommande->removeOrdonnance($this);
  100.         }
  101.         return $this;
  102.     }
  103.     public function getPropriertaire(): ?User
  104.     {
  105.         return $this->propriertaire;
  106.     }
  107.     public function setPropriertaire(?User $propriertaire): self
  108.     {
  109.         $this->propriertaire $propriertaire;
  110.         return $this;
  111.     }
  112.     /**
  113.      * @return Collection<int, IctusPanierPatient>
  114.      */
  115.     public function getIctusPanierPatients(): Collection
  116.     {
  117.         return $this->ictusPanierPatients;
  118.     }
  119.     public function addIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  120.     {
  121.         if (!$this->ictusPanierPatients->contains($ictusPanierPatient)) {
  122.             $this->ictusPanierPatients[] = $ictusPanierPatient;
  123.             $ictusPanierPatient->setOrdonnance($this);
  124.         }
  125.         return $this;
  126.     }
  127.     public function removeIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
  128.     {
  129.         if ($this->ictusPanierPatients->removeElement($ictusPanierPatient)) {
  130.             // set the owning side to null (unless already changed)
  131.             if ($ictusPanierPatient->getOrdonnance() === $this) {
  132.                 $ictusPanierPatient->setOrdonnance(null);
  133.             }
  134.         }
  135.         return $this;
  136.     }
  137.     /**
  138.      * @return Collection<int, IctusCommandeLine>
  139.      */
  140.     public function getIctusCommandeLines(): Collection
  141.     {
  142.         return $this->ictusCommandeLines;
  143.     }
  144.     public function addIctusCommandeLine(IctusCommandeLine $ictusCommandeLine): self
  145.     {
  146.         if (!$this->ictusCommandeLines->contains($ictusCommandeLine)) {
  147.             $this->ictusCommandeLines[] = $ictusCommandeLine;
  148.             $ictusCommandeLine->setOrdonnance($this);
  149.         }
  150.         return $this;
  151.     }
  152.     public function removeIctusCommandeLine(IctusCommandeLine $ictusCommandeLine): self
  153.     {
  154.         if ($this->ictusCommandeLines->removeElement($ictusCommandeLine)) {
  155.             // set the owning side to null (unless already changed)
  156.             if ($ictusCommandeLine->getOrdonnance() === $this) {
  157.                 $ictusCommandeLine->setOrdonnance(null);
  158.             }
  159.         }
  160.         return $this;
  161.     }
  162.     /**
  163.      * @return Collection<int, IctusPanierSpecial>
  164.      */
  165.     public function getIctusPanierSpecials(): Collection
  166.     {
  167.         return $this->ictusPanierSpecials;
  168.     }
  169.     public function addIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
  170.     {
  171.         if (!$this->ictusPanierSpecials->contains($ictusPanierSpecial)) {
  172.             $this->ictusPanierSpecials[] = $ictusPanierSpecial;
  173.             $ictusPanierSpecial->setOrdonnance($this);
  174.         }
  175.         return $this;
  176.     }
  177.     public function removeIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
  178.     {
  179.         if ($this->ictusPanierSpecials->removeElement($ictusPanierSpecial)) {
  180.             // set the owning side to null (unless already changed)
  181.             if ($ictusPanierSpecial->getOrdonnance() === $this) {
  182.                 $ictusPanierSpecial->setOrdonnance(null);
  183.             }
  184.         }
  185.         return $this;
  186.     }
  187.     /**
  188.      * @return Collection<int, CommandeSpecialLine>
  189.      */
  190.     public function getCommandeSpecialLines(): Collection
  191.     {
  192.         return $this->commandeSpecialLines;
  193.     }
  194.     public function addCommandeSpecialLine(CommandeSpecialLine $commandeSpecialLine): self
  195.     {
  196.         if (!$this->commandeSpecialLines->contains($commandeSpecialLine)) {
  197.             $this->commandeSpecialLines[] = $commandeSpecialLine;
  198.             $commandeSpecialLine->setOrdonnance($this);
  199.         }
  200.         return $this;
  201.     }
  202.     public function removeCommandeSpecialLine(CommandeSpecialLine $commandeSpecialLine): self
  203.     {
  204.         if ($this->commandeSpecialLines->removeElement($commandeSpecialLine)) {
  205.             // set the owning side to null (unless already changed)
  206.             if ($commandeSpecialLine->getOrdonnance() === $this) {
  207.                 $commandeSpecialLine->setOrdonnance(null);
  208.             }
  209.         }
  210.         return $this;
  211.     }
  212. }