src/Entity/Gos/VirtualCurrency/VirtualCurrencyTransaction.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\VirtualCurrency;
  3. use App\Entity\Gos\OrderPart;
  4. use App\Entity\Gos\Orders;
  5. use App\Entity\Gos\User;
  6. use App\Repository\Gos\VirtualCurrency\VirtualCurrencyTransactionRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=VirtualCurrencyTransactionRepository::class)
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class VirtualCurrencyTransaction
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=VirtualCurrency::class, inversedBy="virtualCurrencyTransactions")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $virtualCurrency;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $ordTran;
  29.     /**
  30.      * @ORM\Column(type="float")
  31.      */
  32.     private $amount;
  33.     /**
  34.      * @ORM\Column(type="boolean", nullable=true)
  35.      */
  36.     private $isUnlimited;
  37.     /**
  38.      * @ORM\Column(type="datetime")
  39.      */
  40.     private $createdAt;
  41.     /**
  42.      * @ORM\Column(type="datetime", nullable=true)
  43.      */
  44.     private $updatedAt;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="virtualCurrencyTransactions")
  47.      * @ORM\JoinColumn(nullable=false)
  48.      */
  49.     private $user;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity=OrderPart::class, inversedBy="virtualCurrencyTransactions")
  52.      */
  53.     private $orderPart;
  54.     /**
  55.      * @ORM\OneToOne(targetEntity=VirtualCurrencyOrder::class, inversedBy="virtualCurrencyTransaction", cascade={"persist", "remove"})
  56.      */
  57.     private $virtualCurrencyOrder;
  58.     /**
  59.      * @ORM\Column(type="datetime", nullable=true)
  60.      */
  61.     private $validTo;
  62.     /**
  63.      * @ORM\Column(type="integer", nullable=true)
  64.      */
  65.     private $used;
  66.     /**
  67.      * @ORM\Column(type="boolean", nullable=true)
  68.      */
  69.     private $isPaid;
  70.     /**
  71.      * @ORM\PrePersist()
  72.      */
  73.     public function prePersist()
  74.     {
  75.         $this->createdAt = new \DateTime();
  76.     }
  77.     /**
  78.      * @ORM\PreUpdate()
  79.      */
  80.     public function preUpdate()
  81.     {
  82.         $this->updatedAt = new \DateTime();
  83.     }
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getVirtualCurrency(): ?VirtualCurrency
  89.     {
  90.         return $this->virtualCurrency;
  91.     }
  92.     public function setVirtualCurrency(?VirtualCurrency $virtualCurrency): self
  93.     {
  94.         $this->virtualCurrency $virtualCurrency;
  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 getAmount(): ?float
  107.     {
  108.         return $this->amount;
  109.     }
  110.     public function setAmount(float $amount): self
  111.     {
  112.         $this->amount $amount;
  113.         return $this;
  114.     }
  115.     /**
  116.      * @return mixed
  117.      */
  118.     public function getIsUnlimited()
  119.     {
  120.         return $this->isUnlimited;
  121.     }
  122.     /**
  123.      * @param mixed $isUnlimited
  124.      * @return VirtualCurrencyTransaction
  125.      */
  126.     public function setIsUnlimited($isUnlimited): VirtualCurrencyTransaction
  127.     {
  128.         $this->isUnlimited $isUnlimited;
  129.         return $this;
  130.     }
  131.     public function getCreatedAt(): ?\DateTimeInterface
  132.     {
  133.         return $this->createdAt;
  134.     }
  135.     public function getUpdatedAt(): ?\DateTimeInterface
  136.     {
  137.         return $this->updatedAt;
  138.     }
  139.     public function getUser(): ?User
  140.     {
  141.         return $this->user;
  142.     }
  143.     public function setUser(?User $user): self
  144.     {
  145.         $this->user $user;
  146.         return $this;
  147.     }
  148.     public function getOrderPart(): ?OrderPart
  149.     {
  150.         return $this->orderPart;
  151.     }
  152.     public function setOrderPart(?OrderPart $orderPart): self
  153.     {
  154.         $this->orderPart $orderPart;
  155.         return $this;
  156.     }
  157.     public function getVirtualCurrencyOrder(): ?VirtualCurrencyOrder
  158.     {
  159.         return $this->virtualCurrencyOrder;
  160.     }
  161.     public function setVirtualCurrencyOrder(?VirtualCurrencyOrder $virtualCurrencyOrder): self
  162.     {
  163.         $this->virtualCurrencyOrder $virtualCurrencyOrder;
  164.         return $this;
  165.     }
  166.     public function getValidTo(): ?\DateTimeInterface
  167.     {
  168.         return $this->validTo;
  169.     }
  170.     public function setValidTo(?\DateTimeInterface $validTo): self
  171.     {
  172.         $this->validTo $validTo;
  173.         return $this;
  174.     }
  175.     public function getUsed(): ?int
  176.     {
  177.         return $this->used;
  178.     }
  179.     public function setUsed(?int $used): self
  180.     {
  181.         $this->used $used;
  182.         return $this;
  183.     }
  184.     public function getIsPaid(): ?bool
  185.     {
  186.         return $this->isPaid;
  187.     }
  188.     public function setIsPaid(?bool $isPaid): self
  189.     {
  190.         $this->isPaid $isPaid;
  191.         return $this;
  192.     }
  193. }