src/Entity/Gos/NewCardTokenRequest.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\NewCardTokenRequestRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NewCardTokenRequestRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class NewCardTokenRequest
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=OrderPart::class, inversedBy="newCardTokenRequests")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $orderPart;
  22.     /**
  23.      * Previously used card token
  24.      *
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $inactiveToken;
  28.     /**
  29.      * id of the last successful recurring payment given by provider
  30.      *
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $providerOrderId;
  34.     /**
  35.      * FO payment provider system
  36.      * 1 - PayU
  37.      * 2 - WorldPay
  38.      * 3 - Opayo
  39.      * 4 - Stripe
  40.      *
  41.      * @ORM\Column(type="integer")
  42.      */
  43.     private $paymentProviderId;
  44.     /**
  45.      * FO reference id for order
  46.      *
  47.      * @ORM\Column(type="string", length=255)
  48.      */
  49.     private $referenceId;
  50.     /**
  51.      * @ORM\Column(type="datetime")
  52.      */
  53.     private $createdAt;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true)
  56.      */
  57.     private $mailSentAt;
  58.     /**
  59.      * @ORM\Column(type="datetime", nullable=true)
  60.      */
  61.     private $newTokenSentAt;
  62.     /** @ORM\PrePersist() */
  63.     public function prePersist()
  64.     {
  65.         $this->createdAt = new \DateTime();
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getOrderPart(): ?OrderPart
  72.     {
  73.         return $this->orderPart;
  74.     }
  75.     public function setOrderPart(?OrderPart $orderPart): self
  76.     {
  77.         $this->orderPart $orderPart;
  78.         return $this;
  79.     }
  80.     public function getInactiveToken(): ?string
  81.     {
  82.         return $this->inactiveToken;
  83.     }
  84.     public function setInactiveToken(string $inactiveToken): self
  85.     {
  86.         $this->inactiveToken $inactiveToken;
  87.         return $this;
  88.     }
  89.     public function getProviderOrderId(): ?string
  90.     {
  91.         return $this->providerOrderId;
  92.     }
  93.     public function setProviderOrderId(string $providerOrderId): self
  94.     {
  95.         $this->providerOrderId $providerOrderId;
  96.         return $this;
  97.     }
  98.     public function getPaymentProviderId(): ?int
  99.     {
  100.         return $this->paymentProviderId;
  101.     }
  102.     public function setPaymentProviderId(int $paymentProviderId): self
  103.     {
  104.         $this->paymentProviderId $paymentProviderId;
  105.         return $this;
  106.     }
  107.     public function getReferenceId(): ?string
  108.     {
  109.         return $this->referenceId;
  110.     }
  111.     public function setReferenceId(string $referenceId): self
  112.     {
  113.         $this->referenceId $referenceId;
  114.         return $this;
  115.     }
  116.     public function getCreatedAt(): ?\DateTimeInterface
  117.     {
  118.         return $this->createdAt;
  119.     }
  120.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  121.     {
  122.         $this->createdAt $createdAt;
  123.         return $this;
  124.     }
  125.     public function getMailSentAt(): ?\DateTimeInterface
  126.     {
  127.         return $this->mailSentAt;
  128.     }
  129.     public function setMailSentAt(?\DateTimeInterface $mailSentAt null): self
  130.     {
  131.         $this->mailSentAt $mailSentAt ?: new \DateTime();
  132.         return $this;
  133.     }
  134.     public function getNewTokenSentAt(): ?\DateTimeInterface
  135.     {
  136.         return $this->newTokenSentAt;
  137.     }
  138.     public function setNewTokenSentAt(?\DateTimeInterface $newTokenSentAt null): self
  139.     {
  140.         $this->newTokenSentAt $newTokenSentAt ?: new \DateTime();
  141.         return $this;
  142.     }
  143. }