<?php
namespace App\Entity;
use App\Repository\OrdonnanceRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=OrdonnanceRepository::class)
*/
class Ordonnance
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $titre;
/**
* @ORM\Column(type="string", length=255)
*/
private $fichier;
/**
* @ORM\ManyToMany(targetEntity=IctusCommande::class, mappedBy="Ordonnance")
*/
private $ictusCommandes;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="ordonnances")
* @ORM\JoinColumn(nullable=false)
*/
private $propriertaire;
/**
* @ORM\OneToMany(targetEntity=IctusPanierPatient::class, mappedBy="ordonnance")
*/
private $ictusPanierPatients;
/**
* @ORM\OneToMany(targetEntity=IctusCommandeLine::class, mappedBy="ordonnance")
*/
private $ictusCommandeLines;
/**
* @ORM\OneToMany(targetEntity=IctusPanierSpecial::class, mappedBy="ordonnance")
*/
private $ictusPanierSpecials;
/**
* @ORM\OneToMany(targetEntity=CommandeSpecialLine::class, mappedBy="ordonnance")
*/
private $commandeSpecialLines;
public function __construct()
{
$this->ictusCommandes = new ArrayCollection();
$this->ictusPanierPatients = new ArrayCollection();
$this->ictusCommandeLines = new ArrayCollection();
$this->ictusPanierSpecials = new ArrayCollection();
$this->commandeSpecialLines = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getFichier(): ?string
{
return $this->fichier;
}
public function setFichier(string $fichier): self
{
$this->fichier = $fichier;
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->addOrdonnance($this);
}
return $this;
}
public function removeIctusCommande(IctusCommande $ictusCommande): self
{
if ($this->ictusCommandes->removeElement($ictusCommande)) {
$ictusCommande->removeOrdonnance($this);
}
return $this;
}
public function getPropriertaire(): ?User
{
return $this->propriertaire;
}
public function setPropriertaire(?User $propriertaire): self
{
$this->propriertaire = $propriertaire;
return $this;
}
/**
* @return Collection<int, IctusPanierPatient>
*/
public function getIctusPanierPatients(): Collection
{
return $this->ictusPanierPatients;
}
public function addIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
{
if (!$this->ictusPanierPatients->contains($ictusPanierPatient)) {
$this->ictusPanierPatients[] = $ictusPanierPatient;
$ictusPanierPatient->setOrdonnance($this);
}
return $this;
}
public function removeIctusPanierPatient(IctusPanierPatient $ictusPanierPatient): self
{
if ($this->ictusPanierPatients->removeElement($ictusPanierPatient)) {
// set the owning side to null (unless already changed)
if ($ictusPanierPatient->getOrdonnance() === $this) {
$ictusPanierPatient->setOrdonnance(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusCommandeLine>
*/
public function getIctusCommandeLines(): Collection
{
return $this->ictusCommandeLines;
}
public function addIctusCommandeLine(IctusCommandeLine $ictusCommandeLine): self
{
if (!$this->ictusCommandeLines->contains($ictusCommandeLine)) {
$this->ictusCommandeLines[] = $ictusCommandeLine;
$ictusCommandeLine->setOrdonnance($this);
}
return $this;
}
public function removeIctusCommandeLine(IctusCommandeLine $ictusCommandeLine): self
{
if ($this->ictusCommandeLines->removeElement($ictusCommandeLine)) {
// set the owning side to null (unless already changed)
if ($ictusCommandeLine->getOrdonnance() === $this) {
$ictusCommandeLine->setOrdonnance(null);
}
}
return $this;
}
/**
* @return Collection<int, IctusPanierSpecial>
*/
public function getIctusPanierSpecials(): Collection
{
return $this->ictusPanierSpecials;
}
public function addIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
{
if (!$this->ictusPanierSpecials->contains($ictusPanierSpecial)) {
$this->ictusPanierSpecials[] = $ictusPanierSpecial;
$ictusPanierSpecial->setOrdonnance($this);
}
return $this;
}
public function removeIctusPanierSpecial(IctusPanierSpecial $ictusPanierSpecial): self
{
if ($this->ictusPanierSpecials->removeElement($ictusPanierSpecial)) {
// set the owning side to null (unless already changed)
if ($ictusPanierSpecial->getOrdonnance() === $this) {
$ictusPanierSpecial->setOrdonnance(null);
}
}
return $this;
}
/**
* @return Collection<int, CommandeSpecialLine>
*/
public function getCommandeSpecialLines(): Collection
{
return $this->commandeSpecialLines;
}
public function addCommandeSpecialLine(CommandeSpecialLine $commandeSpecialLine): self
{
if (!$this->commandeSpecialLines->contains($commandeSpecialLine)) {
$this->commandeSpecialLines[] = $commandeSpecialLine;
$commandeSpecialLine->setOrdonnance($this);
}
return $this;
}
public function removeCommandeSpecialLine(CommandeSpecialLine $commandeSpecialLine): self
{
if ($this->commandeSpecialLines->removeElement($commandeSpecialLine)) {
// set the owning side to null (unless already changed)
if ($commandeSpecialLine->getOrdonnance() === $this) {
$commandeSpecialLine->setOrdonnance(null);
}
}
return $this;
}
}