<?php
namespace App\Entity;
use App\Repository\TransactionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TransactionRepository::class)
*/
class Transaction
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="transactions")
* @ORM\JoinColumn(nullable=false)
*/
private $linked;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $amount;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $description;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
private $created_by;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $wallet;
/**
* @ORM\Column(type="string", length=10, nullable=true)
*/
private $type;
public function getId(): ?int
{
return $this->id;
}
public function getLinked(): ?User
{
return $this->linked;
}
public function setLinked(?User $linked): self
{
$this->linked = $linked;
return $this;
}
public function getAmount(): ?int
{
return $this->amount;
}
public function setAmount(?int $amount): self
{
$this->amount = $amount;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->created_by;
}
public function setCreatedBy(?User $created_by): self
{
$this->created_by = $created_by;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getWallet(): ?string
{
return $this->wallet;
}
public function setWallet(string $wallet): self
{
$this->wallet = $wallet;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
}