src/Entity/Typepaiement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\TypepaiementRepository;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypepaiementRepository::class)
  9.  */
  10. class Typepaiement
  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 $nom;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Order::class, mappedBy="typepaiement")
  24.      */
  25.     private $orders;
  26.      /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $name_en;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=UserTypepaiement::class, mappedBy="typepaiements")
  32.      */
  33.     private $userTypepaiements;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=HistoriquePaiement::class, mappedBy="typepaiement")
  36.      */
  37.     private $historiquePaiements;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=Forecast::class, mappedBy="typepaiement")
  40.      */
  41.     private $forecasts;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="typePaiementDemande")
  44.      */
  45.     private $ictoRemboursements;
  46.     /**
  47.      * @ORM\OneToMany(targetEntity=IctoRemboursement::class, mappedBy="typePaiementObtenue")
  48.      */
  49.     private $ictoRemboursementObtenu;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=FacturePharmacie::class, mappedBy="typePaiement")
  52.      */
  53.     private $facturePharmacies;
  54.     /**
  55.      * @ORM\OneToMany(targetEntity=FactPcieHistoriquePaiement::class, mappedBy="typePaiement")
  56.      */
  57.     private $factPcieHistoriquePaiements;
  58.     public function __construct()
  59.     {
  60.         $this->orders = new ArrayCollection();
  61.         $this->userTypepaiements = new ArrayCollection();
  62.         $this->historiquePaiements = new ArrayCollection();
  63.         $this->forecasts = new ArrayCollection();
  64.         $this->ictoRemboursements = new ArrayCollection();
  65.         $this->ictoRemboursementObtenu = new ArrayCollection();
  66.         $this->facturePharmacies = new ArrayCollection();
  67.         $this->factPcieHistoriquePaiements = new ArrayCollection();
  68.     }
  69.     public function __toString(){
  70.         return $this->getName();
  71.     }
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     public function getNom(): ?string
  77.     {
  78.         return $this->nom;
  79.     }
  80.     public function setNom(string $nom): self
  81.     {
  82.         $this->nom $nom;
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection<int, Order>
  87.      */
  88.     public function getOrders(): Collection
  89.     {
  90.         return $this->orders;
  91.     }
  92.     public function addOrder(Order $order): self
  93.     {
  94.         if (!$this->orders->contains($order)) {
  95.             $this->orders[] = $order;
  96.             $order->setTypepaiement($this);
  97.         }
  98.         return $this;
  99.     }
  100.     public function removeOrder(Order $order): self
  101.     {
  102.         if ($this->orders->removeElement($order)) {
  103.             // set the owning side to null (unless already changed)
  104.             if ($order->getTypepaiement() === $this) {
  105.                 $order->setTypepaiement(null);
  106.             }
  107.         }
  108.         return $this;
  109.     }
  110.     public function getNameEn(): ?string
  111.     {
  112.         return $this->name_en;
  113.     }
  114.     public function setNameEn(?string $name_en): self
  115.     {
  116.         $this->name_en $name_en;
  117.         return $this;
  118.     }
  119.     /**
  120.      * @return Collection<int, UserTypepaiement>
  121.      */
  122.     public function getUserTypepaiements(): Collection
  123.     {
  124.         return $this->userTypepaiements;
  125.     }
  126.     public function addUserTypepaiement(UserTypepaiement $userTypepaiement): self
  127.     {
  128.         if (!$this->userTypepaiements->contains($userTypepaiement)) {
  129.             $this->userTypepaiements[] = $userTypepaiement;
  130.             $userTypepaiement->setTypepaiements($this);
  131.         }
  132.         return $this;
  133.     }
  134.     public function removeUserTypepaiement(UserTypepaiement $userTypepaiement): self
  135.     {
  136.         if ($this->userTypepaiements->removeElement($userTypepaiement)) {
  137.             // set the owning side to null (unless already changed)
  138.             if ($userTypepaiement->getTypepaiements() === $this) {
  139.                 $userTypepaiement->setTypepaiements(null);
  140.             }
  141.         }
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return Collection<int, HistoriquePaiement>
  146.      */
  147.     public function getHistoriquePaiements(): Collection
  148.     {
  149.         return $this->historiquePaiements;
  150.     }
  151.     public function addHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
  152.     {
  153.         if (!$this->historiquePaiements->contains($historiquePaiement)) {
  154.             $this->historiquePaiements[] = $historiquePaiement;
  155.             $historiquePaiement->setTypepaiement($this);
  156.         }
  157.         return $this;
  158.     }
  159.     public function removeHistoriquePaiement(HistoriquePaiement $historiquePaiement): self
  160.     {
  161.         if ($this->historiquePaiements->removeElement($historiquePaiement)) {
  162.             // set the owning side to null (unless already changed)
  163.             if ($historiquePaiement->getTypepaiement() === $this) {
  164.                 $historiquePaiement->setTypepaiement(null);
  165.             }
  166.         }
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return Collection<int, Forecast>
  171.      */
  172.     public function getForecasts(): Collection
  173.     {
  174.         return $this->forecasts;
  175.     }
  176.     public function addForecast(Forecast $forecast): self
  177.     {
  178.         if (!$this->forecasts->contains($forecast)) {
  179.             $this->forecasts[] = $forecast;
  180.             $forecast->setTypepaiement($this);
  181.         }
  182.         return $this;
  183.     }
  184.     public function removeForecast(Forecast $forecast): self
  185.     {
  186.         if ($this->forecasts->removeElement($forecast)) {
  187.             // set the owning side to null (unless already changed)
  188.             if ($forecast->getTypepaiement() === $this) {
  189.                 $forecast->setTypepaiement(null);
  190.             }
  191.         }
  192.         return $this;
  193.     }
  194.     /**
  195.      * @return Collection<int, IctoRemboursement>
  196.      */
  197.     public function getIctoRemboursements(): Collection
  198.     {
  199.         return $this->ictoRemboursements;
  200.     }
  201.     public function addIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  202.     {
  203.         if (!$this->ictoRemboursements->contains($ictoRemboursement)) {
  204.             $this->ictoRemboursements[] = $ictoRemboursement;
  205.             $ictoRemboursement->setTypePaiementDemande($this);
  206.         }
  207.         return $this;
  208.     }
  209.     public function removeIctoRemboursement(IctoRemboursement $ictoRemboursement): self
  210.     {
  211.         if ($this->ictoRemboursements->removeElement($ictoRemboursement)) {
  212.             // set the owning side to null (unless already changed)
  213.             if ($ictoRemboursement->getTypePaiementDemande() === $this) {
  214.                 $ictoRemboursement->setTypePaiementDemande(null);
  215.             }
  216.         }
  217.         return $this;
  218.     }
  219.     /**
  220.      * @return Collection<int, IctoRemboursement>
  221.      */
  222.     public function getIctoRemboursementObtenu(): Collection
  223.     {
  224.         return $this->ictoRemboursementObtenu;
  225.     }
  226.     public function addIctoRemboursementObtenu(IctoRemboursement $ictoRemboursementObtenu): self
  227.     {
  228.         if (!$this->ictoRemboursementObtenu->contains($ictoRemboursementObtenu)) {
  229.             $this->ictoRemboursementObtenu[] = $ictoRemboursementObtenu;
  230.             $ictoRemboursementObtenu->setTypePaiementObtenue($this);
  231.         }
  232.         return $this;
  233.     }
  234.     public function removeIctoRemboursementObtenu(IctoRemboursement $ictoRemboursementObtenu): self
  235.     {
  236.         if ($this->ictoRemboursementObtenu->removeElement($ictoRemboursementObtenu)) {
  237.             // set the owning side to null (unless already changed)
  238.             if ($ictoRemboursementObtenu->getTypePaiementObtenue() === $this) {
  239.                 $ictoRemboursementObtenu->setTypePaiementObtenue(null);
  240.             }
  241.         }
  242.         return $this;
  243.     }
  244.     /**
  245.      * @return Collection<int, FacturePharmacie>
  246.      */
  247.     public function getFacturePharmacies(): Collection
  248.     {
  249.         return $this->facturePharmacies;
  250.     }
  251.     public function addFacturePharmacy(FacturePharmacie $facturePharmacy): self
  252.     {
  253.         if (!$this->facturePharmacies->contains($facturePharmacy)) {
  254.             $this->facturePharmacies[] = $facturePharmacy;
  255.             $facturePharmacy->setTypePaiement($this);
  256.         }
  257.         return $this;
  258.     }
  259.     public function removeFacturePharmacy(FacturePharmacie $facturePharmacy): self
  260.     {
  261.         if ($this->facturePharmacies->removeElement($facturePharmacy)) {
  262.             // set the owning side to null (unless already changed)
  263.             if ($facturePharmacy->getTypePaiement() === $this) {
  264.                 $facturePharmacy->setTypePaiement(null);
  265.             }
  266.         }
  267.         return $this;
  268.     }
  269.     /**
  270.      * @return Collection<int, FactPcieHistoriquePaiement>
  271.      */
  272.     public function getFactPcieHistoriquePaiements(): Collection
  273.     {
  274.         return $this->factPcieHistoriquePaiements;
  275.     }
  276.     public function addFactPcieHistoriquePaiement(FactPcieHistoriquePaiement $factPcieHistoriquePaiement): self
  277.     {
  278.         if (!$this->factPcieHistoriquePaiements->contains($factPcieHistoriquePaiement)) {
  279.             $this->factPcieHistoriquePaiements[] = $factPcieHistoriquePaiement;
  280.             $factPcieHistoriquePaiement->setTypePaiement($this);
  281.         }
  282.         return $this;
  283.     }
  284.     public function removeFactPcieHistoriquePaiement(FactPcieHistoriquePaiement $factPcieHistoriquePaiement): self
  285.     {
  286.         if ($this->factPcieHistoriquePaiements->removeElement($factPcieHistoriquePaiement)) {
  287.             // set the owning side to null (unless already changed)
  288.             if ($factPcieHistoriquePaiement->getTypePaiement() === $this) {
  289.                 $factPcieHistoriquePaiement->setTypePaiement(null);
  290.             }
  291.         }
  292.         return $this;
  293.     }
  294. }