src/Entity/Gos/VirtualCurrency/VirtualCurrencyOrder.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\VirtualCurrency;
  3. use App\Entity\Gos\PortalSettings;
  4. use App\Entity\Gos\User;
  5. use App\Repository\Gos\VirtualCurrency\VirtualCurrencyOrderRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=VirtualCurrencyOrderRepository::class)
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class VirtualCurrencyOrder
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="virtualCurrencyOrders")
  21.      * @ORM\JoinColumn(nullable=false)
  22.      */
  23.     private $user;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $ordTran;
  28.     /**
  29.      * @ORM\Column(type="string", length=255)
  30.      */
  31.     private $productVariantNoComplete;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity=VirtualCurrency::class, inversedBy="virtualCurrencyOrders")
  34.      * @ORM\JoinColumn(nullable=false)
  35.      */
  36.     private $virtualCurrency;
  37.     /**
  38.      * @ORM\Column(type="float")
  39.      */
  40.     private $amount;
  41.     /**
  42.      * @ORM\Column(type="datetime")
  43.      */
  44.     private $createdAt;
  45.     /**
  46.      * @ORM\Column(type="datetime", nullable=true)
  47.      */
  48.     private $updatedAt;
  49.     /**
  50.      * @ORM\Column(type="datetime", nullable=true)
  51.      */
  52.     private $accessTo;
  53.     /**
  54.      * @ORM\OneToOne(targetEntity=VirtualCurrencyTransaction::class, mappedBy="virtualCurrencyOrder", cascade={"persist", "remove"})
  55.      */
  56.     private $virtualCurrencyTransaction;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity=PortalSettings::class)
  59.      * @ORM\JoinColumn(nullable=false)
  60.      */
  61.     private $portalSettings;
  62.     /**
  63.      * @ORM\Column(type="string", length=255)
  64.      */
  65.     private $title;
  66.     /**
  67.      * @ORM\PrePersist()
  68.      */
  69.     public function prePersist()
  70.     {
  71.         $this->createdAt = new \DateTime();
  72.     }
  73.     /**
  74.      * @ORM\PreUpdate()
  75.      */
  76.     public function preUpdate()
  77.     {
  78.         $this->updatedAt = new \DateTime();
  79.     }
  80.     public function getObjectVars()
  81.     {
  82.         return get_object_vars($this);
  83.     }
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getUser(): ?User
  89.     {
  90.         return $this->user;
  91.     }
  92.     public function setUser(?User $user): self
  93.     {
  94.         $this->user $user;
  95.         return $this;
  96.     }
  97.     public function getOrdTran(): ?string
  98.     {
  99.         return $this->ordTran;
  100.     }
  101.     public function setOrdTran(string $ordTran): self
  102.     {
  103.         $this->ordTran $ordTran;
  104.         return $this;
  105.     }
  106.     public function getProductVariantNoComplete(): ?string
  107.     {
  108.         return $this->productVariantNoComplete;
  109.     }
  110.     public function setProductVariantNoComplete(string $productVariantNoComplete): self
  111.     {
  112.         $this->productVariantNoComplete $productVariantNoComplete;
  113.         return $this;
  114.     }
  115.     public function getVirtualCurrency(): ?VirtualCurrency
  116.     {
  117.         return $this->virtualCurrency;
  118.     }
  119.     public function setVirtualCurrency(?VirtualCurrency $virtualCurrency): self
  120.     {
  121.         $this->virtualCurrency $virtualCurrency;
  122.         return $this;
  123.     }
  124.     public function getAmount(): ?float
  125.     {
  126.         return $this->amount;
  127.     }
  128.     public function setAmount(float $amount): self
  129.     {
  130.         $this->amount $amount;
  131.         return $this;
  132.     }
  133.     public function getCreatedAt(): ?\DateTimeInterface
  134.     {
  135.         return $this->createdAt;
  136.     }
  137.     public function getUpdatedAt(): ?\DateTimeInterface
  138.     {
  139.         return $this->updatedAt;
  140.     }
  141.     public function getAccessTo(): ?\DateTimeInterface
  142.     {
  143.         return $this->accessTo;
  144.     }
  145.     public function setAccessTo(?\DateTimeInterface $accessTo): self
  146.     {
  147.         $this->accessTo $accessTo;
  148.         return $this;
  149.     }
  150.     public function getVirtualCurrencyTransaction(): ?VirtualCurrencyTransaction
  151.     {
  152.         return $this->virtualCurrencyTransaction;
  153.     }
  154.     public function setVirtualCurrencyTransaction(?VirtualCurrencyTransaction $virtualCurrencyTransaction): self
  155.     {
  156.         $this->virtualCurrencyTransaction $virtualCurrencyTransaction;
  157.         // set (or unset) the owning side of the relation if necessary
  158.         $newVirtualCurrencyOrder null === $virtualCurrencyTransaction null $this;
  159.         if ($virtualCurrencyTransaction->getVirtualCurrencyOrder() !== $newVirtualCurrencyOrder) {
  160.             $virtualCurrencyTransaction->setVirtualCurrencyOrder($newVirtualCurrencyOrder);
  161.         }
  162.         return $this;
  163.     }
  164.     public function getPortalSettings(): ?PortalSettings
  165.     {
  166.         return $this->portalSettings;
  167.     }
  168.     public function setPortalSettings(?PortalSettings $portalSettings): self
  169.     {
  170.         $this->portalSettings $portalSettings;
  171.         return $this;
  172.     }
  173.     public function getTitle(): ?string
  174.     {
  175.         return $this->title;
  176.     }
  177.     public function setTitle(string $title): self
  178.     {
  179.         $this->title $title;
  180.         return $this;
  181.     }
  182. }