src/Entity/Gos/UserCard.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\UserCardRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=UserCardRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class UserCard
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="boolean", nullable=true)
  19.      */
  20.     private $isActive;
  21.     /**
  22.      * @ORM\Column(type="boolean", nullable=true)
  23.      */
  24.     private $alreadyUsed;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userCards")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $user;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $token;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $temporaryToken;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Orders::class, inversedBy="userCards")
  40.      */
  41.     private $orders;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $number;
  46.     /**
  47.      * @ORM\Column(type="integer", nullable=true)
  48.      */
  49.     private $expirationMonth;
  50.     /**
  51.      * @ORM\Column(type="integer", nullable=true)
  52.      */
  53.     private $expirationYear;
  54.     /**
  55.      * @ORM\Column(type="text", nullable=true)
  56.      */
  57.     private $payuResponse;
  58.     /**
  59.      * @ORM\Column(type="datetime")
  60.      */
  61.     private $createdAt;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=true)
  64.      */
  65.     private $updatedAt;
  66.     /**
  67.      * @ORM\Column(type="boolean", nullable=true)
  68.      */
  69.     private $hasBeenAccepted;
  70.     /**
  71.      * @ORM\Column(type="text", nullable=true)
  72.      */
  73.     private $customerData;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $extOrderId;
  78.     /**
  79.      * @ORM\Column(type="text", nullable=true)
  80.      */
  81.     private $opayoResponse;
  82.     public function __toString()
  83.     {
  84.         return $this->number;
  85.     }
  86.     /** @ORM\PrePersist() */
  87.     public function onPrePersist()
  88.     {
  89.         $this->createdAt = new \DateTime();
  90.     }
  91.     /** @ORM\PreUpdate() */
  92.     public function onPreUpdate()
  93.     {
  94.         $this->updatedAt = new \DateTime();
  95.     }
  96.     public function getId(): ?int
  97.     {
  98.         return $this->id;
  99.     }
  100.     public function getIsActive(): ?bool
  101.     {
  102.         return $this->isActive;
  103.     }
  104.     public function setIsActive(?bool $isActive): self
  105.     {
  106.         $this->isActive $isActive;
  107.         return $this;
  108.     }
  109.     public function getAlreadyUsed(): ?bool
  110.     {
  111.         return $this->alreadyUsed;
  112.     }
  113.     public function setAlreadyUsed(?bool $alreadyUsed): self
  114.     {
  115.         $this->alreadyUsed $alreadyUsed;
  116.         return $this;
  117.     }
  118.     public function getToken(): ?string
  119.     {
  120.         return $this->token;
  121.     }
  122.     public function setToken(?string $token): self
  123.     {
  124.         $this->token $token;
  125.         return $this;
  126.     }
  127.     public function getTemporaryToken(): ?string
  128.     {
  129.         return $this->temporaryToken;
  130.     }
  131.     public function setTemporaryToken(?string $temporaryToken): self
  132.     {
  133.         $this->temporaryToken $temporaryToken;
  134.         return $this;
  135.     }
  136.     public function getUser(): ?User
  137.     {
  138.         return $this->user;
  139.     }
  140.     public function setUser(?User $user): self
  141.     {
  142.         $this->user $user;
  143.         return $this;
  144.     }
  145.     public function getOrders(): ?Orders
  146.     {
  147.         return $this->orders;
  148.     }
  149.     public function setOrders(?Orders $orders): self
  150.     {
  151.         $this->orders $orders;
  152.         return $this;
  153.     }
  154.     public function getNumber(): ?string
  155.     {
  156.         return $this->number;
  157.     }
  158.     public function setNumber(?string $number): self
  159.     {
  160.         $this->number $number;
  161.         return $this;
  162.     }
  163.     public function getExpirationMonth(): ?int
  164.     {
  165.         return $this->expirationMonth;
  166.     }
  167.     public function setExpirationMonth(?int $expirationMonth): self
  168.     {
  169.         $this->expirationMonth $expirationMonth;
  170.         return $this;
  171.     }
  172.     public function getExpirationYear(): ?int
  173.     {
  174.         return $this->expirationYear;
  175.     }
  176.     public function setExpirationYear(?int $expirationYear): self
  177.     {
  178.         $this->expirationYear $expirationYear;
  179.         return $this;
  180.     }
  181.     public function getPayuResponse(): ?string
  182.     {
  183.         return $this->payuResponse;
  184.     }
  185.     public function setPayuResponse(?string $payuResponse): self
  186.     {
  187.         $this->payuResponse $payuResponse;
  188.         return $this;
  189.     }
  190.     public function getCreatedAt(): ?\DateTimeInterface
  191.     {
  192.         return $this->createdAt;
  193.     }
  194.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  195.     {
  196.         $this->createdAt $createdAt;
  197.         return $this;
  198.     }
  199.     public function getUpdatedAt(): ?\DateTimeInterface
  200.     {
  201.         return $this->updatedAt;
  202.     }
  203.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  204.     {
  205.         $this->updatedAt $updatedAt;
  206.         return $this;
  207.     }
  208.     public function getHasBeenAccepted(): ?bool
  209.     {
  210.         return $this->hasBeenAccepted;
  211.     }
  212.     public function setHasBeenAccepted(?bool $hasBeenAccepted): self
  213.     {
  214.         $this->hasBeenAccepted $hasBeenAccepted;
  215.         return $this;
  216.     }
  217.     public function getCustomerData(): ?string
  218.     {
  219.         return $this->customerData;
  220.     }
  221.     public function setCustomerData(?string $customerData): self
  222.     {
  223.         $this->customerData $customerData;
  224.         return $this;
  225.     }
  226.     public function getExtOrderId(): ?string
  227.     {
  228.         return $this->extOrderId;
  229.     }
  230.     public function setExtOrderId(?string $extOrderId): self
  231.     {
  232.         $this->extOrderId $extOrderId;
  233.         return $this;
  234.     }
  235.     public function getOpayoResponse(): ?string
  236.     {
  237.         return $this->opayoResponse;
  238.     }
  239.     public function setOpayoResponse(?string $opayoResponse): self
  240.     {
  241.         $this->opayoResponse $opayoResponse;
  242.         return $this;
  243.     }
  244. }