src/Entity/IctusTypePaiement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\IctusTypePaiementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=IctusTypePaiementRepository::class)
  9.  */
  10. class IctusTypePaiement
  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\OneToMany(targetEntity=IctusPaiementPharmacie::class, mappedBy="ictusTypePaiement")
  24.      */
  25.     private $ictusPaiementPharmacies;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=IctusCommande::class, mappedBy="typePaiement")
  28.      */
  29.     private $ictusCommandes;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=IctusHistoriquePaiement::class, mappedBy="ictusTypePaiement")
  32.      */
  33.     private $ictusHistoriquePaiements;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=CommandeSpecial::class, mappedBy="typePaiement")
  36.      */
  37.     private $commandeSpecials;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="lastTypePaiement")
  40.      */
  41.     private $users;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=HistoriqueReglement::class, mappedBy="typePaiement")
  44.      */
  45.     private $historiqueReglements;
  46.     public function __construct()
  47.     {
  48.         $this->ictusPaiementPharmacies = new ArrayCollection();
  49.         $this->ictusCommandes = new ArrayCollection();
  50.         $this->ictusHistoriquePaiements = new ArrayCollection();
  51.         $this->commandeSpecials = new ArrayCollection();
  52.         $this->users = new ArrayCollection();
  53.         $this->historiqueReglements = new ArrayCollection();
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getDesignation(): ?string
  60.     {
  61.         return $this->designation;
  62.     }
  63.     public function setDesignation(string $designation): self
  64.     {
  65.         $this->designation $designation;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return Collection<int, IctusPaiementPharmacie>
  70.      */
  71.     public function getIctusPaiementPharmacies(): Collection
  72.     {
  73.         return $this->ictusPaiementPharmacies;
  74.     }
  75.     public function addIctusPaiementPharmacy(IctusPaiementPharmacie $ictusPaiementPharmacy): self
  76.     {
  77.         if (!$this->ictusPaiementPharmacies->contains($ictusPaiementPharmacy)) {
  78.             $this->ictusPaiementPharmacies[] = $ictusPaiementPharmacy;
  79.             $ictusPaiementPharmacy->setIctusTypePaiement($this);
  80.         }
  81.         return $this;
  82.     }
  83.     public function removeIctusPaiementPharmacy(IctusPaiementPharmacie $ictusPaiementPharmacy): self
  84.     {
  85.         if ($this->ictusPaiementPharmacies->removeElement($ictusPaiementPharmacy)) {
  86.             // set the owning side to null (unless already changed)
  87.             if ($ictusPaiementPharmacy->getIctusTypePaiement() === $this) {
  88.                 $ictusPaiementPharmacy->setIctusTypePaiement(null);
  89.             }
  90.         }
  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->setTypePaiement($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->getTypePaiement() === $this) {
  113.                 $ictusCommande->setTypePaiement(null);
  114.             }
  115.         }
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return Collection<int, IctusHistoriquePaiement>
  120.      */
  121.     public function getIctusHistoriquePaiements(): Collection
  122.     {
  123.         return $this->ictusHistoriquePaiements;
  124.     }
  125.     public function addIctusHistoriquePaiement(IctusHistoriquePaiement $ictusHistoriquePaiement): self
  126.     {
  127.         if (!$this->ictusHistoriquePaiements->contains($ictusHistoriquePaiement)) {
  128.             $this->ictusHistoriquePaiements[] = $ictusHistoriquePaiement;
  129.             $ictusHistoriquePaiement->setIctusTypePaiement($this);
  130.         }
  131.         return $this;
  132.     }
  133.     public function removeIctusHistoriquePaiement(IctusHistoriquePaiement $ictusHistoriquePaiement): self
  134.     {
  135.         if ($this->ictusHistoriquePaiements->removeElement($ictusHistoriquePaiement)) {
  136.             // set the owning side to null (unless already changed)
  137.             if ($ictusHistoriquePaiement->getIctusTypePaiement() === $this) {
  138.                 $ictusHistoriquePaiement->setIctusTypePaiement(null);
  139.             }
  140.         }
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return Collection<int, CommandeSpecial>
  145.      */
  146.     public function getCommandeSpecials(): Collection
  147.     {
  148.         return $this->commandeSpecials;
  149.     }
  150.     public function addCommandeSpecial(CommandeSpecial $commandeSpecial): self
  151.     {
  152.         if (!$this->commandeSpecials->contains($commandeSpecial)) {
  153.             $this->commandeSpecials[] = $commandeSpecial;
  154.             $commandeSpecial->setTypePaiement($this);
  155.         }
  156.         return $this;
  157.     }
  158.     public function removeCommandeSpecial(CommandeSpecial $commandeSpecial): self
  159.     {
  160.         if ($this->commandeSpecials->removeElement($commandeSpecial)) {
  161.             // set the owning side to null (unless already changed)
  162.             if ($commandeSpecial->getTypePaiement() === $this) {
  163.                 $commandeSpecial->setTypePaiement(null);
  164.             }
  165.         }
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return Collection<int, User>
  170.      */
  171.     public function getUsers(): Collection
  172.     {
  173.         return $this->users;
  174.     }
  175.     public function addUser(User $user): self
  176.     {
  177.         if (!$this->users->contains($user)) {
  178.             $this->users[] = $user;
  179.             $user->setLastTypePaiement($this);
  180.         }
  181.         return $this;
  182.     }
  183.     public function removeUser(User $user): self
  184.     {
  185.         if ($this->users->removeElement($user)) {
  186.             // set the owning side to null (unless already changed)
  187.             if ($user->getLastTypePaiement() === $this) {
  188.                 $user->setLastTypePaiement(null);
  189.             }
  190.         }
  191.         return $this;
  192.     }
  193.     /**
  194.      * @return Collection<int, HistoriqueReglement>
  195.      */
  196.     public function getHistoriqueReglements(): Collection
  197.     {
  198.         return $this->historiqueReglements;
  199.     }
  200.     public function addHistoriqueReglement(HistoriqueReglement $historiqueReglement): self
  201.     {
  202.         if (!$this->historiqueReglements->contains($historiqueReglement)) {
  203.             $this->historiqueReglements[] = $historiqueReglement;
  204.             $historiqueReglement->setTypePaiement($this);
  205.         }
  206.         return $this;
  207.     }
  208.     public function removeHistoriqueReglement(HistoriqueReglement $historiqueReglement): self
  209.     {
  210.         if ($this->historiqueReglements->removeElement($historiqueReglement)) {
  211.             // set the owning side to null (unless already changed)
  212.             if ($historiqueReglement->getTypePaiement() === $this) {
  213.                 $historiqueReglement->setTypePaiement(null);
  214.             }
  215.         }
  216.         return $this;
  217.     }
  218. }