src/Entity/ProductWebhosting.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductWebhostingRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProductWebhostingRepository::class)
  9.  */
  10. class ProductWebhosting
  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 $product_name;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $product_description_short;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $product_description_long;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $product_image;
  34.     /**
  35.      * @ORM\Column(type="boolean")
  36.      */
  37.     private $is_public;
  38.     /**
  39.      * @ORM\Column(type="boolean")
  40.      */
  41.     private $is_active;
  42.     /**
  43.      * @ORM\Column(type="integer", nullable=true)
  44.      */
  45.     private $reg_by;
  46.     /**
  47.      * @ORM\Column(type="datetime", nullable=true)
  48.      */
  49.     private $reg_datetime;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity=Cart::class, mappedBy="product_webhosting")
  52.      */
  53.     private $carts;
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      */
  57.     private $included_domains;
  58.     /**
  59.      * @ORM\Column(type="decimal", precision=10, scale=2)
  60.      */
  61.     private $extra_other_domains_price;
  62.     /**
  63.      * @ORM\Column(type="integer")
  64.      */
  65.     private $amount_databases;
  66.     /**
  67.      * @ORM\Column(type="string", length=255)
  68.      */
  69.     private $webspace;
  70.     /**
  71.      * @ORM\Column(type="decimal", precision=10, scale=2)
  72.      */
  73.     private $extra_de_domains_price;
  74.     /**
  75.      * @ORM\Column(type="decimal", precision=10, scale=2)
  76.      */
  77.     private $extra_com_domains_price;
  78.     /**
  79.      * @ORM\Column(type="decimal", precision=10, scale=2)
  80.      */
  81.     private $package_price;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity=CartWebhosting::class, mappedBy="product_webhosting")
  84.      */
  85.     private $cartWebhostings;
  86.     /**
  87.      * @ORM\Column(type="string", length=255, nullable=true)
  88.      */
  89.     private $included_domain_tld;
  90.     /**
  91.      * @ORM\OneToMany(targetEntity=Subscription::class, mappedBy="product_webhosting")
  92.      */
  93.     private $subscriptions;
  94.     public function __construct()
  95.     {
  96.         $this->carts = new ArrayCollection();
  97.         $this->cartWebhostings = new ArrayCollection();
  98.         $this->subscriptions = new ArrayCollection();
  99.     }
  100.     public function getId(): ?int
  101.     {
  102.         return $this->id;
  103.     }
  104.     public function getProductName(): ?string
  105.     {
  106.         return $this->product_name;
  107.     }
  108.     public function setProductName(string $product_name): self
  109.     {
  110.         $this->product_name $product_name;
  111.         return $this;
  112.     }
  113.     public function getProductDescriptionShort(): ?string
  114.     {
  115.         return $this->product_description_short;
  116.     }
  117.     public function setProductDescriptionShort(string $product_description_short): self
  118.     {
  119.         $this->product_description_short $product_description_short;
  120.         return $this;
  121.     }
  122.     public function getProductDescriptionLong(): ?string
  123.     {
  124.         return $this->product_description_long;
  125.     }
  126.     public function setProductDescriptionLong(?string $product_description_long): self
  127.     {
  128.         $this->product_description_long $product_description_long;
  129.         return $this;
  130.     }
  131.     public function getProductImage(): ?string
  132.     {
  133.         return $this->product_image;
  134.     }
  135.     public function setProductImage(?string $product_image): self
  136.     {
  137.         $this->product_image $product_image;
  138.         return $this;
  139.     }
  140.     public function isIsPublic(): ?bool
  141.     {
  142.         return $this->is_public;
  143.     }
  144.     public function setIsPublic(bool $is_public): self
  145.     {
  146.         $this->is_public $is_public;
  147.         return $this;
  148.     }
  149.     public function isIsActive(): ?bool
  150.     {
  151.         return $this->is_active;
  152.     }
  153.     public function setIsActive(bool $is_active): self
  154.     {
  155.         $this->is_active $is_active;
  156.         return $this;
  157.     }
  158.     public function getRegBy(): ?int
  159.     {
  160.         return $this->reg_by;
  161.     }
  162.     public function setRegBy(?int $reg_by): self
  163.     {
  164.         $this->reg_by $reg_by;
  165.         return $this;
  166.     }
  167.     public function getRegDatetime(): ?\DateTimeInterface
  168.     {
  169.         return $this->reg_datetime;
  170.     }
  171.     public function setRegDatetime(?\DateTimeInterface $reg_datetime): self
  172.     {
  173.         $this->reg_datetime $reg_datetime;
  174.         return $this;
  175.     }
  176.     /**
  177.      * @return Collection<int, Cart>
  178.      */
  179.     public function getCarts(): Collection
  180.     {
  181.         return $this->carts;
  182.     }
  183.     public function addCart(Cart $cart): self
  184.     {
  185.         if (!$this->carts->contains($cart)) {
  186.             $this->carts[] = $cart;
  187.             $cart->setProductWebhosting($this);
  188.         }
  189.         return $this;
  190.     }
  191.     public function removeCart(Cart $cart): self
  192.     {
  193.         if ($this->carts->removeElement($cart)) {
  194.             // set the owning side to null (unless already changed)
  195.             if ($cart->getProductWebhosting() === $this) {
  196.                 $cart->setProductWebhosting(null);
  197.             }
  198.         }
  199.         return $this;
  200.     }
  201.     public function getIncludedDomains(): ?int
  202.     {
  203.         return $this->included_domains;
  204.     }
  205.     public function setIncludedDomains(int $included_domains): self
  206.     {
  207.         $this->included_domains $included_domains;
  208.         return $this;
  209.     }
  210.     public function getExtraOtherDomainsPrice(): ?string
  211.     {
  212.         return $this->extra_other_domains_price;
  213.     }
  214.     public function setExtraOtherDomainsPrice(string $extra_other_domains_price): self
  215.     {
  216.         $this->extra_other_domains_price $extra_other_domains_price;
  217.         return $this;
  218.     }
  219.     public function getAmountDatabases(): ?int
  220.     {
  221.         return $this->amount_databases;
  222.     }
  223.     public function setAmountDatabases(int $amount_databases): self
  224.     {
  225.         $this->amount_databases $amount_databases;
  226.         return $this;
  227.     }
  228.     public function getWebspace(): ?string
  229.     {
  230.         return $this->webspace;
  231.     }
  232.     public function setWebspace(string $webspace): self
  233.     {
  234.         $this->webspace $webspace;
  235.         return $this;
  236.     }
  237.     public function getExtraDeDomainsPrice(): ?string
  238.     {
  239.         return $this->extra_de_domains_price;
  240.     }
  241.     public function setExtraDeDomainsPrice(string $extra_de_domains_price): self
  242.     {
  243.         $this->extra_de_domains_price $extra_de_domains_price;
  244.         return $this;
  245.     }
  246.     public function getExtraComDomainsPrice(): ?string
  247.     {
  248.         return $this->extra_com_domains_price;
  249.     }
  250.     public function setExtraComDomainsPrice(string $extra_com_domains_price): self
  251.     {
  252.         $this->extra_com_domains_price $extra_com_domains_price;
  253.         return $this;
  254.     }
  255.     public function getPackagePrice(): ?string
  256.     {
  257.         return $this->package_price;
  258.     }
  259.     public function setPackagePrice(string $package_price): self
  260.     {
  261.         $this->package_price $package_price;
  262.         return $this;
  263.     }
  264.     /**
  265.      * @return Collection<int, CartWebhosting>
  266.      */
  267.     public function getCartWebhostings(): Collection
  268.     {
  269.         return $this->cartWebhostings;
  270.     }
  271.     public function addCartWebhosting(CartWebhosting $cartWebhosting): self
  272.     {
  273.         if (!$this->cartWebhostings->contains($cartWebhosting)) {
  274.             $this->cartWebhostings[] = $cartWebhosting;
  275.             $cartWebhosting->setProductWebhosting($this);
  276.         }
  277.         return $this;
  278.     }
  279.     public function removeCartWebhosting(CartWebhosting $cartWebhosting): self
  280.     {
  281.         if ($this->cartWebhostings->removeElement($cartWebhosting)) {
  282.             // set the owning side to null (unless already changed)
  283.             if ($cartWebhosting->getProductWebhosting() === $this) {
  284.                 $cartWebhosting->setProductWebhosting(null);
  285.             }
  286.         }
  287.         return $this;
  288.     }
  289.     public function getIncludedDomainTld(): ?string
  290.     {
  291.         return $this->included_domain_tld;
  292.     }
  293.     public function setIncludedDomainTld(?string $included_domain_tld): self
  294.     {
  295.         $this->included_domain_tld $included_domain_tld;
  296.         return $this;
  297.     }
  298.     public function __toString()
  299.     {
  300.         return $this->getProductName();
  301.     }
  302.     /**
  303.      * @return Collection<int, Subscription>
  304.      */
  305.     public function getSubscriptions(): Collection
  306.     {
  307.         return $this->subscriptions;
  308.     }
  309.     public function addSubscription(Subscription $subscription): self
  310.     {
  311.         if (!$this->subscriptions->contains($subscription)) {
  312.             $this->subscriptions[] = $subscription;
  313.             $subscription->setProductWebhosting($this);
  314.         }
  315.         return $this;
  316.     }
  317.     public function removeSubscription(Subscription $subscription): self
  318.     {
  319.         if ($this->subscriptions->removeElement($subscription)) {
  320.             // set the owning side to null (unless already changed)
  321.             if ($subscription->getProductWebhosting() === $this) {
  322.                 $subscription->setProductWebhosting(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327. }