src/Entity/TypeFacture.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeFactureRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypeFactureRepository::class)
  9.  */
  10. class TypeFacture
  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="float")
  24.      */
  25.     private $value;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=FacturePatient::class, mappedBy="typefacture", orphanRemoval=true)
  28.      */
  29.     private $facturePatients;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=FacturePharmacie::class, mappedBy="typeFacture")
  32.      */
  33.     private $facturePharmacies;
  34.     public function __construct()
  35.     {
  36.         $this->facturePatients = new ArrayCollection();
  37.         $this->facturePharmacies = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getDesignation(): ?string
  44.     {
  45.         return $this->designation;
  46.     }
  47.     public function setDesignation(string $designation): self
  48.     {
  49.         $this->designation $designation;
  50.         return $this;
  51.     }
  52.     public function getValue(): ?float
  53.     {
  54.         return $this->value;
  55.     }
  56.     public function setValue(float $value): self
  57.     {
  58.         $this->value $value;
  59.         return $this;
  60.     }
  61.     /**
  62.      * @return Collection<int, FacturePatient>
  63.      */
  64.     public function getFacturePatients(): Collection
  65.     {
  66.         return $this->facturePatients;
  67.     }
  68.     public function addFacturePatient(FacturePatient $facturePatient): self
  69.     {
  70.         if (!$this->facturePatients->contains($facturePatient)) {
  71.             $this->facturePatients[] = $facturePatient;
  72.             $facturePatient->setTypefacture($this);
  73.         }
  74.         return $this;
  75.     }
  76.     public function removeFacturePatient(FacturePatient $facturePatient): self
  77.     {
  78.         if ($this->facturePatients->removeElement($facturePatient)) {
  79.             // set the owning side to null (unless already changed)
  80.             if ($facturePatient->getTypefacture() === $this) {
  81.                 $facturePatient->setTypefacture(null);
  82.             }
  83.         }
  84.         return $this;
  85.     }
  86.     /**
  87.      * @return Collection<int, FacturePharmacie>
  88.      */
  89.     public function getFacturePharmacies(): Collection
  90.     {
  91.         return $this->facturePharmacies;
  92.     }
  93.     public function addFacturePharmacy(FacturePharmacie $facturePharmacy): self
  94.     {
  95.         if (!$this->facturePharmacies->contains($facturePharmacy)) {
  96.             $this->facturePharmacies[] = $facturePharmacy;
  97.             $facturePharmacy->setTypeFacture($this);
  98.         }
  99.         return $this;
  100.     }
  101.     public function removeFacturePharmacy(FacturePharmacie $facturePharmacy): self
  102.     {
  103.         if ($this->facturePharmacies->removeElement($facturePharmacy)) {
  104.             // set the owning side to null (unless already changed)
  105.             if ($facturePharmacy->getTypeFacture() === $this) {
  106.                 $facturePharmacy->setTypeFacture(null);
  107.             }
  108.         }
  109.         return $this;
  110.     }
  111. }