<?php
namespace App\Entity;
use App\Repository\ProductWebhostingRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProductWebhostingRepository::class)
*/
class ProductWebhosting
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $product_name;
/**
* @ORM\Column(type="string", length=255)
*/
private $product_description_short;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $product_description_long;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $product_image;
/**
* @ORM\Column(type="boolean")
*/
private $is_public;
/**
* @ORM\Column(type="boolean")
*/
private $is_active;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $reg_by;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $reg_datetime;
/**
* @ORM\OneToMany(targetEntity=Cart::class, mappedBy="product_webhosting")
*/
private $carts;
/**
* @ORM\Column(type="integer")
*/
private $included_domains;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
*/
private $extra_other_domains_price;
/**
* @ORM\Column(type="integer")
*/
private $amount_databases;
/**
* @ORM\Column(type="string", length=255)
*/
private $webspace;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
*/
private $extra_de_domains_price;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
*/
private $extra_com_domains_price;
/**
* @ORM\Column(type="decimal", precision=10, scale=2)
*/
private $package_price;
/**
* @ORM\OneToMany(targetEntity=CartWebhosting::class, mappedBy="product_webhosting")
*/
private $cartWebhostings;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $included_domain_tld;
/**
* @ORM\OneToMany(targetEntity=Subscription::class, mappedBy="product_webhosting")
*/
private $subscriptions;
public function __construct()
{
$this->carts = new ArrayCollection();
$this->cartWebhostings = new ArrayCollection();
$this->subscriptions = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getProductName(): ?string
{
return $this->product_name;
}
public function setProductName(string $product_name): self
{
$this->product_name = $product_name;
return $this;
}
public function getProductDescriptionShort(): ?string
{
return $this->product_description_short;
}
public function setProductDescriptionShort(string $product_description_short): self
{
$this->product_description_short = $product_description_short;
return $this;
}
public function getProductDescriptionLong(): ?string
{
return $this->product_description_long;
}
public function setProductDescriptionLong(?string $product_description_long): self
{
$this->product_description_long = $product_description_long;
return $this;
}
public function getProductImage(): ?string
{
return $this->product_image;
}
public function setProductImage(?string $product_image): self
{
$this->product_image = $product_image;
return $this;
}
public function isIsPublic(): ?bool
{
return $this->is_public;
}
public function setIsPublic(bool $is_public): self
{
$this->is_public = $is_public;
return $this;
}
public function isIsActive(): ?bool
{
return $this->is_active;
}
public function setIsActive(bool $is_active): self
{
$this->is_active = $is_active;
return $this;
}
public function getRegBy(): ?int
{
return $this->reg_by;
}
public function setRegBy(?int $reg_by): self
{
$this->reg_by = $reg_by;
return $this;
}
public function getRegDatetime(): ?\DateTimeInterface
{
return $this->reg_datetime;
}
public function setRegDatetime(?\DateTimeInterface $reg_datetime): self
{
$this->reg_datetime = $reg_datetime;
return $this;
}
/**
* @return Collection<int, Cart>
*/
public function getCarts(): Collection
{
return $this->carts;
}
public function addCart(Cart $cart): self
{
if (!$this->carts->contains($cart)) {
$this->carts[] = $cart;
$cart->setProductWebhosting($this);
}
return $this;
}
public function removeCart(Cart $cart): self
{
if ($this->carts->removeElement($cart)) {
// set the owning side to null (unless already changed)
if ($cart->getProductWebhosting() === $this) {
$cart->setProductWebhosting(null);
}
}
return $this;
}
public function getIncludedDomains(): ?int
{
return $this->included_domains;
}
public function setIncludedDomains(int $included_domains): self
{
$this->included_domains = $included_domains;
return $this;
}
public function getExtraOtherDomainsPrice(): ?string
{
return $this->extra_other_domains_price;
}
public function setExtraOtherDomainsPrice(string $extra_other_domains_price): self
{
$this->extra_other_domains_price = $extra_other_domains_price;
return $this;
}
public function getAmountDatabases(): ?int
{
return $this->amount_databases;
}
public function setAmountDatabases(int $amount_databases): self
{
$this->amount_databases = $amount_databases;
return $this;
}
public function getWebspace(): ?string
{
return $this->webspace;
}
public function setWebspace(string $webspace): self
{
$this->webspace = $webspace;
return $this;
}
public function getExtraDeDomainsPrice(): ?string
{
return $this->extra_de_domains_price;
}
public function setExtraDeDomainsPrice(string $extra_de_domains_price): self
{
$this->extra_de_domains_price = $extra_de_domains_price;
return $this;
}
public function getExtraComDomainsPrice(): ?string
{
return $this->extra_com_domains_price;
}
public function setExtraComDomainsPrice(string $extra_com_domains_price): self
{
$this->extra_com_domains_price = $extra_com_domains_price;
return $this;
}
public function getPackagePrice(): ?string
{
return $this->package_price;
}
public function setPackagePrice(string $package_price): self
{
$this->package_price = $package_price;
return $this;
}
/**
* @return Collection<int, CartWebhosting>
*/
public function getCartWebhostings(): Collection
{
return $this->cartWebhostings;
}
public function addCartWebhosting(CartWebhosting $cartWebhosting): self
{
if (!$this->cartWebhostings->contains($cartWebhosting)) {
$this->cartWebhostings[] = $cartWebhosting;
$cartWebhosting->setProductWebhosting($this);
}
return $this;
}
public function removeCartWebhosting(CartWebhosting $cartWebhosting): self
{
if ($this->cartWebhostings->removeElement($cartWebhosting)) {
// set the owning side to null (unless already changed)
if ($cartWebhosting->getProductWebhosting() === $this) {
$cartWebhosting->setProductWebhosting(null);
}
}
return $this;
}
public function getIncludedDomainTld(): ?string
{
return $this->included_domain_tld;
}
public function setIncludedDomainTld(?string $included_domain_tld): self
{
$this->included_domain_tld = $included_domain_tld;
return $this;
}
public function __toString()
{
return $this->getProductName();
}
/**
* @return Collection<int, Subscription>
*/
public function getSubscriptions(): Collection
{
return $this->subscriptions;
}
public function addSubscription(Subscription $subscription): self
{
if (!$this->subscriptions->contains($subscription)) {
$this->subscriptions[] = $subscription;
$subscription->setProductWebhosting($this);
}
return $this;
}
public function removeSubscription(Subscription $subscription): self
{
if ($this->subscriptions->removeElement($subscription)) {
// set the owning side to null (unless already changed)
if ($subscription->getProductWebhosting() === $this) {
$subscription->setProductWebhosting(null);
}
}
return $this;
}
}