src/Entity/CartWebhosting.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CartWebhostingRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CartWebhostingRepository::class)
  9.  */
  10. class CartWebhosting
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="cartWebhostings")
  20.      */
  21.     private $client;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $session_id;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=ProductWebhosting::class, inversedBy="cartWebhostings")
  28.      */
  29.     private $product_webhosting;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=CartDomain::class, mappedBy="cart_webhosting")
  32.      */
  33.     private $cartDomains;
  34.     /**
  35.      * @ORM\Column(type="decimal", precision=10, scale=2)
  36.      */
  37.     private $monthly_price;
  38.     /**
  39.      * @ORM\Column(type="datetime", nullable=true)
  40.      */
  41.     private $reg_datetime;
  42.     public function __construct()
  43.     {
  44.         $this->cartDomains = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getClient(): ?User
  51.     {
  52.         return $this->client;
  53.     }
  54.     public function setClient(?User $client): self
  55.     {
  56.         $this->client $client;
  57.         return $this;
  58.     }
  59.     public function getSessionId(): ?string
  60.     {
  61.         return $this->session_id;
  62.     }
  63.     public function setSessionId(string $session_id): self
  64.     {
  65.         $this->session_id $session_id;
  66.         return $this;
  67.     }
  68.     public function getProductWebhosting(): ?ProductWebhosting
  69.     {
  70.         return $this->product_webhosting;
  71.     }
  72.     public function setProductWebhosting(?ProductWebhosting $product_webhosting): self
  73.     {
  74.         $this->product_webhosting $product_webhosting;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return Collection<int, CartDomain>
  79.      */
  80.     public function getCartDomains(): Collection
  81.     {
  82.         return $this->cartDomains;
  83.     }
  84.     public function addCartDomain(CartDomain $cartDomain): self
  85.     {
  86.         if (!$this->cartDomains->contains($cartDomain)) {
  87.             $this->cartDomains[] = $cartDomain;
  88.             $cartDomain->setCartWebhosting($this);
  89.         }
  90.         return $this;
  91.     }
  92.     public function removeCartDomain(CartDomain $cartDomain): self
  93.     {
  94.         if ($this->cartDomains->removeElement($cartDomain)) {
  95.             // set the owning side to null (unless already changed)
  96.             if ($cartDomain->getCartWebhosting() === $this) {
  97.                 $cartDomain->setCartWebhosting(null);
  98.             }
  99.         }
  100.         return $this;
  101.     }
  102.     public function getMonthlyPrice(): ?string
  103.     {
  104.         return $this->monthly_price;
  105.     }
  106.     public function setMonthlyPrice(string $monthly_price): self
  107.     {
  108.         $this->monthly_price $monthly_price;
  109.         return $this;
  110.     }
  111.     public function getRegDatetime(): ?\DateTimeInterface
  112.     {
  113.         return $this->reg_datetime;
  114.     }
  115.     public function setRegDatetime(?\DateTimeInterface $reg_datetime): self
  116.     {
  117.         $this->reg_datetime $reg_datetime;
  118.         return $this;
  119.     }
  120. }