src/Entity/SubscriptionPlanPrice.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SubscriptionPlanPriceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SubscriptionPlanPriceRepository::class)
  9.  */
  10. class SubscriptionPlanPrice
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="subscriptionPlanPrices")
  20.      */
  21.     private $product;
  22.     /**
  23.      * @ORM\Column(type="decimal", precision=10, scale=2)
  24.      */
  25.     private $single_price_month_user;
  26.     /**
  27.      * @ORM\Column(type="decimal", precision=10, scale=2)
  28.      */
  29.     private $single_price_month_extra_lic;
  30.     /**
  31.      * @ORM\Column(type="integer", nullable=true)
  32.      */
  33.     private $min_user;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=true)
  36.      */
  37.     private $max_user;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=SubscriptionPlan::class, inversedBy="subscriptionPlanPrices")
  40.      */
  41.     private $subscription_plan;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getSubscriptionPlan(): ?SubscriptionPlan
  47.     {
  48.         return $this->subscription_plan;
  49.     }
  50.     public function setSubscriptionPlan(?SubscriptionPlan $subscription_plan): self
  51.     {
  52.         $this->subscription_plan $subscription_plan;
  53.         return $this;
  54.     }
  55.     public function getProduct(): ?Product
  56.     {
  57.         return $this->product;
  58.     }
  59.     public function setProduct(?Product $product): self
  60.     {
  61.         $this->product $product;
  62.         return $this;
  63.     }
  64.     public function getSinglePriceMonthUser(): ?string
  65.     {
  66.         return $this->single_price_month_user;
  67.     }
  68.     public function setSinglePriceMonthUser(string $single_price_month_user): self
  69.     {
  70.         $this->single_price_month_user $single_price_month_user;
  71.         return $this;
  72.     }
  73.     public function getSinglePriceMonthExtraLic(): ?string
  74.     {
  75.         return $this->single_price_month_extra_lic;
  76.     }
  77.     public function setSinglePriceMonthExtraLic(string $single_price_month_extra_lic): self
  78.     {
  79.         $this->single_price_month_extra_lic $single_price_month_extra_lic;
  80.         return $this;
  81.     }
  82.     public function getMinUser(): ?int
  83.     {
  84.         return $this->min_user;
  85.     }
  86.     public function setMinUser(?int $min_user): self
  87.     {
  88.         $this->min_user $min_user;
  89.         return $this;
  90.     }
  91.     public function getMaxUser(): ?int
  92.     {
  93.         return $this->max_user;
  94.     }
  95.     public function setMaxUser(?int $max_user): self
  96.     {
  97.         $this->max_user $max_user;
  98.         return $this;
  99.     }
  100.     /**
  101.      * @return Collection<int, Subscription>
  102.      */
  103.     public function getSubscriptions(): Collection
  104.     {
  105.         return $this->subscriptions;
  106.     }
  107.     public function addSubscription(Subscription $subscription): self
  108.     {
  109.         if (!$this->subscriptions->contains($subscription)) {
  110.             $this->subscriptions[] = $subscription;
  111.             $subscription->setSubscriptionPlanPrice($this);
  112.         }
  113.         return $this;
  114.     }
  115.     public function removeSubscription(Subscription $subscription): self
  116.     {
  117.         if ($this->subscriptions->removeElement($subscription)) {
  118.             // set the owning side to null (unless already changed)
  119.             if ($subscription->getSubscriptionPlanPrice() === $this) {
  120.                 $subscription->setSubscriptionPlanPrice(null);
  121.             }
  122.         }
  123.         return $this;
  124.     }
  125. }