src/Entity/Gos/AdditionalOptionsByClientType.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\AdditionalOptionsByClientTypeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AdditionalOptionsByClientTypeRepository::class)
  9.  * @ORM\HasLifecycleCallbacks
  10.  */
  11. class AdditionalOptionsByClientType
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="boolean", nullable=true)
  21.      */
  22.     private $hiddenInSBTillPaid;
  23.     /**
  24.      * @ORM\Column(type="integer")
  25.      */
  26.     private $extendedPaymentTime;
  27.     /**
  28.      * @ORM\ManyToMany(targetEntity=PaymentMethod::class)
  29.      */
  30.     private $paymentMethod;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $createdAt;
  35.     /**
  36.      * @ORM\Column(type="datetime", nullable=true)
  37.      */
  38.     private $updatedAt;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity=ProductVariant::class, inversedBy="additionalOptionsByClientTypes")
  41.      */
  42.     private $productVariant;
  43.     /**
  44.      * @ORM\Column(type="boolean", nullable=true)
  45.      */
  46.     private $isActive;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity=ClientType::class)
  49.      */
  50.     private $clientType;
  51.     /** @ORM\PrePersist() */
  52.     public function onPrePersist()
  53.     {
  54.         $this->createdAt = new \DateTime();
  55.     }
  56.     /** @ORM\PreUpdate() */
  57.     public function onPreUpdate()
  58.     {
  59.         $this->updatedAt = new \DateTime();
  60.     }
  61.     public function __construct()
  62.     {
  63.         $this->paymentMethod = new ArrayCollection();
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getHiddenInSBTillPaid(): ?bool
  70.     {
  71.         return $this->hiddenInSBTillPaid;
  72.     }
  73.     public function setHiddenInSBTillPaid(?bool $hiddenInSBTillPaid): self
  74.     {
  75.         $this->hiddenInSBTillPaid $hiddenInSBTillPaid;
  76.         return $this;
  77.     }
  78.     public function getExtendedPaymentTime(): ?int
  79.     {
  80.         return $this->extendedPaymentTime;
  81.     }
  82.     public function setExtendedPaymentTime(int $extendedPaymentTime): self
  83.     {
  84.         $this->extendedPaymentTime $extendedPaymentTime;
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return Collection|PaymentMethod[]
  89.      */
  90.     public function getPaymentMethod(): Collection
  91.     {
  92.         return $this->paymentMethod;
  93.     }
  94.     public function addPaymentMethod(PaymentMethod $paymentMethod): self
  95.     {
  96.         if (!$this->paymentMethod->contains($paymentMethod)) {
  97.             $this->paymentMethod[] = $paymentMethod;
  98.         }
  99.         return $this;
  100.     }
  101.     public function removePaymentMethod(PaymentMethod $paymentMethod): self
  102.     {
  103.         if ($this->paymentMethod->contains($paymentMethod)) {
  104.             $this->paymentMethod->removeElement($paymentMethod);
  105.         }
  106.         return $this;
  107.     }
  108.     public function getCreatedAt(): ?\DateTimeInterface
  109.     {
  110.         return $this->createdAt;
  111.     }
  112.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  113.     {
  114.         $this->createdAt $createdAt;
  115.         return $this;
  116.     }
  117.     public function getUpdatedAt(): ?\DateTimeInterface
  118.     {
  119.         return $this->updatedAt;
  120.     }
  121.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  122.     {
  123.         $this->updatedAt $updatedAt;
  124.         return $this;
  125.     }
  126.     public function getProductVariant(): ?ProductVariant
  127.     {
  128.         return $this->productVariant;
  129.     }
  130.     public function setProductVariant(?ProductVariant $productVariant): self
  131.     {
  132.         $this->productVariant $productVariant;
  133.         return $this;
  134.     }
  135.     public function getIsActive(): ?bool
  136.     {
  137.         return $this->isActive;
  138.     }
  139.     public function setIsActive(?bool $isActive): self
  140.     {
  141.         $this->isActive $isActive;
  142.         return $this;
  143.     }
  144.     public function getClientType(): ?ClientType
  145.     {
  146.         return $this->clientType;
  147.     }
  148.     public function setClientType(?ClientType $clientType): self
  149.     {
  150.         $this->clientType $clientType;
  151.         return $this;
  152.     }
  153. }