src/Entity/Transaction.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TransactionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=TransactionRepository::class)
  7.  */
  8. class Transaction
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="transactions")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $linked;
  21.     /**
  22.      * @ORM\Column(type="integer", nullable=true)
  23.      */
  24.     private $amount;
  25.     /**
  26.      * @ORM\Column(type="text", nullable=true)
  27.      */
  28.     private $description;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=User::class)
  31.      */
  32.     private $created_by;
  33.     /**
  34.      * @ORM\Column(type="datetime")
  35.      */
  36.     private $created_at;
  37.     /**
  38.      * @ORM\Column(type="string", length=20, nullable=true)
  39.      */
  40.     private $wallet;
  41.     /**
  42.      * @ORM\Column(type="string", length=10, nullable=true)
  43.      */
  44.     private $type;
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getLinked(): ?User
  50.     {
  51.         return $this->linked;
  52.     }
  53.     public function setLinked(?User $linked): self
  54.     {
  55.         $this->linked $linked;
  56.         return $this;
  57.     }
  58.     public function getAmount(): ?int
  59.     {
  60.         return $this->amount;
  61.     }
  62.     public function setAmount(?int $amount): self
  63.     {
  64.         $this->amount $amount;
  65.         return $this;
  66.     }
  67.     public function getDescription(): ?string
  68.     {
  69.         return $this->description;
  70.     }
  71.     public function setDescription(?string $description): self
  72.     {
  73.         $this->description $description;
  74.         return $this;
  75.     }
  76.     public function getCreatedBy(): ?User
  77.     {
  78.         return $this->created_by;
  79.     }
  80.     public function setCreatedBy(?User $created_by): self
  81.     {
  82.         $this->created_by $created_by;
  83.         return $this;
  84.     }
  85.     public function getCreatedAt(): ?\DateTimeInterface
  86.     {
  87.         return $this->created_at;
  88.     }
  89.     public function setCreatedAt(\DateTimeInterface $created_at): self
  90.     {
  91.         $this->created_at $created_at;
  92.         return $this;
  93.     }
  94.     public function getWallet(): ?string
  95.     {
  96.         return $this->wallet;
  97.     }
  98.     public function setWallet(string $wallet): self
  99.     {
  100.         $this->wallet $wallet;
  101.         return $this;
  102.     }
  103.     public function getType(): ?string
  104.     {
  105.         return $this->type;
  106.     }
  107.     public function setType(?string $type): self
  108.     {
  109.         $this->type $type;
  110.         return $this;
  111.     }
  112. }