src/Entity/TypeAbonnement.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeAbonnementRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypeAbonnementRepository::class)
  9.  */
  10. class TypeAbonnement
  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 $label;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Abonnement::class, mappedBy="typeAbonnement")
  24.      */
  25.     private $abonnements;
  26.     /**
  27.      * @ORM\Column(type="integer", options={"default": 0})
  28.      */
  29.     private $prix;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      */
  33.     private $explication;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $stripeID;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $paymentLink;
  42.     public function __construct()
  43.     {
  44.         $this->abonnements = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getLabel(): ?string
  51.     {
  52.         return $this->label;
  53.     }
  54.     public function setLabel(string $label): self
  55.     {
  56.         $this->label $label;
  57.         return $this;
  58.     }
  59.     /**
  60.      * @return Collection|Abonnement[]
  61.      */
  62.     public function getAbonnements(): Collection
  63.     {
  64.         return $this->abonnements;
  65.     }
  66.     public function addAbonnement(Abonnement $abonnement): self
  67.     {
  68.         if (!$this->abonnements->contains($abonnement)) {
  69.             $this->abonnements[] = $abonnement;
  70.             $abonnement->setTypeAbonnement($this);
  71.         }
  72.         return $this;
  73.     }
  74.     public function removeAbonnement(Abonnement $abonnement): self
  75.     {
  76.         if ($this->abonnements->removeElement($abonnement)) {
  77.             // set the owning side to null (unless already changed)
  78.             if ($abonnement->getTypeAbonnement() === $this) {
  79.                 $abonnement->setTypeAbonnement(null);
  80.             }
  81.         }
  82.         return $this;
  83.     }
  84.     public function getPrix(): ?int
  85.     {
  86.         return $this->prix;
  87.     }
  88.     public function setPrix(int $prix): self
  89.     {
  90.         $this->prix $prix;
  91.         return $this;
  92.     }
  93.     public function getExplication(): ?string
  94.     {
  95.         return $this->explication;
  96.     }
  97.     public function setExplication(?string $explication): self
  98.     {
  99.         $this->explication $explication;
  100.         return $this;
  101.     }
  102.     public function getStripeID(): ?string
  103.     {
  104.         return $this->stripeID;
  105.     }
  106.     public function setStripeID(?string $stripeID): self
  107.     {
  108.         $this->stripeID $stripeID;
  109.         return $this;
  110.     }
  111.     public function getPaymentLink(): ?string
  112.     {
  113.         return $this->paymentLink;
  114.     }
  115.     public function setPaymentLink(?string $paymentLink): self
  116.     {
  117.         $this->paymentLink $paymentLink;
  118.         return $this;
  119.     }
  120. }