src/Entity/Gos/TeleOrder.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Entity\Gos\Orders;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\Gos\TeleOrderRepository")
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class TeleOrder
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\OneToOne(targetEntity="Orders", inversedBy="teleOrder", cascade={"persist", "remove"})
  19.      * @ORM\JoinColumn()
  20.      */
  21.     private $mainOrder;
  22.     /**
  23.      * @ORM\Column(type="string", length=255)
  24.      */
  25.     private $hash;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $pin;
  30.     /**
  31.      * @ORM\Column(type="datetime", nullable=true)
  32.      */
  33.     private $validTo;
  34.     /**
  35.      * @ORM\Column(type="datetime", nullable=true)
  36.      */
  37.     private $createdAt;
  38.     /**
  39.      * @ORM\Column(type="boolean", nullable=true)
  40.      */
  41.     private $hasFinished;
  42.     /**
  43.      * @ORM\Column(type="boolean", nullable=true)
  44.      */
  45.     private $userCreated;
  46.     /**
  47.      * @ORM\OneToOne(targetEntity="App\Entity\Gos\ShortUrl", cascade={"persist", "remove"})
  48.      */
  49.     private $url;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     private $rid;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true)
  56.      */
  57.     private $finishedAt;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $urlString;
  62.     /**
  63.      * @ORM\Column(type="json", nullable=true)
  64.      */
  65.     private $productVariants = [];
  66.     /** @ORM\PrePersist() */
  67.     public function onPrePersist(): void
  68.     {
  69.         $this->createdAt = new \DateTime();
  70.     }
  71.     public function getId(): ?int
  72.     {
  73.         return $this->id;
  74.     }
  75.     public function getMainOrder(): ?Orders
  76.     {
  77.         return $this->mainOrder;
  78.     }
  79.     public function setMainOrder(?Orders $mainOrder): self
  80.     {
  81.         $this->mainOrder $mainOrder;
  82.         return $this;
  83.     }
  84.     public function getHash(): ?string
  85.     {
  86.         return $this->hash;
  87.     }
  88.     public function setHash(string $hash): self
  89.     {
  90.         $this->hash $hash;
  91.         return $this;
  92.     }
  93.     public function getPin(): ?string
  94.     {
  95.         return $this->pin;
  96.     }
  97.     public function setPin(string $pin): self
  98.     {
  99.         $this->pin $pin;
  100.         return $this;
  101.     }
  102.     public function getValidTo(): ?\DateTimeInterface
  103.     {
  104.         return $this->validTo;
  105.     }
  106.     public function setValidTo(?\DateTimeInterface $validTo): self
  107.     {
  108.         $this->validTo $validTo;
  109.         return $this;
  110.     }
  111.     public function getCreatedAt(): ?\DateTimeInterface
  112.     {
  113.         return $this->createdAt;
  114.     }
  115.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  116.     {
  117.         $this->createdAt $createdAt;
  118.         return $this;
  119.     }
  120.     public function getHasFinished(): ?bool
  121.     {
  122.         return $this->hasFinished;
  123.     }
  124.     public function setHasFinished(?bool $hasFinished): self
  125.     {
  126.         $this->hasFinished $hasFinished;
  127.         return $this;
  128.     }
  129.     public function getUserCreated(): ?bool
  130.     {
  131.         return $this->userCreated;
  132.     }
  133.     public function setUserCreated(?bool $userCreated): self
  134.     {
  135.         $this->userCreated $userCreated;
  136.         return $this;
  137.     }
  138.     public function getUrl(): ?ShortUrl
  139.     {
  140.         return $this->url;
  141.     }
  142.     public function setUrl(?ShortUrl $url): self
  143.     {
  144.         $this->url $url;
  145.         return $this;
  146.     }
  147.     public function getRid(): ?string
  148.     {
  149.         return $this->rid;
  150.     }
  151.     public function setRid(?string $rid): self
  152.     {
  153.         $this->rid $rid;
  154.         return $this;
  155.     }
  156.     public function getFinishedAt(): ?\DateTimeInterface
  157.     {
  158.         return $this->finishedAt;
  159.     }
  160.     public function setFinishedAt(?\DateTimeInterface $finishedAt): self
  161.     {
  162.         $this->finishedAt $finishedAt;
  163.         return $this;
  164.     }
  165.     public function getUrlString(): ?string
  166.     {
  167.         return $this->urlString;
  168.     }
  169.     public function setUrlString(?string $urlString): self
  170.     {
  171.         $this->urlString $urlString;
  172.         return $this;
  173.     }
  174.     public function getProductVariants(): ?array
  175.     {
  176.         return $this->productVariants;
  177.     }
  178.     public function setProductVariants(?array $productVariants): self
  179.     {
  180.         $this->productVariants $productVariants;
  181.         return $this;
  182.     }
  183. }