src/Entity/Retrait.php line 9
<?php
namespace App\Entity;
use App\Repository\RetraitRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: RetraitRepository::class)]
class Retrait
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'retraits')]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
#[ORM\Column]
#[Groups(['read:retraits:item'])]
private ?float $montant = null;
#[ORM\Column]
private ?bool $isDone = null;
#[ORM\Column(length: 50)]
#[Groups(['read:retraits:item'])]
private ?string $numeroTelephone = null;
#[ORM\ManyToOne(inversedBy: 'retraits')]
#[ORM\JoinColumn(nullable: false)]
private ?PaymentMethod $paymentMethod = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(length: 50, nullable: true)]
#[Groups(['read:user:item'])]
private ?string $status = null;
#[ORM\Column(length: 150, nullable: true)]
#[Groups(['read:user:item'])]
private ?string $transactionReference = null;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable();
$this->isDone = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): static
{
$this->user = $user;
return $this;
}
public function getMontant(): ?float
{
return $this->montant;
}
public function setMontant(float $montant): static
{
$this->montant = $montant;
return $this;
}
public function isIsDone(): ?bool
{
return $this->isDone;
}
public function setIsDone(bool $isDone): static
{
$this->isDone = $isDone;
return $this;
}
public function getNumeroTelephone(): ?string
{
return $this->numeroTelephone;
}
public function setNumeroTelephone(string $numeroTelephone): static
{
$this->numeroTelephone = $numeroTelephone;
return $this;
}
public function getPaymentMethod(): ?PaymentMethod
{
return $this->paymentMethod;
}
public function setPaymentMethod(?PaymentMethod $paymentMethod): static
{
$this->paymentMethod = $paymentMethod;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): static
{
$this->status = $status;
return $this;
}
public function getTransactionReference(): ?string
{
return $this->transactionReference;
}
public function setTransactionReference(?string $transactionReference): static
{
$this->transactionReference = $transactionReference;
return $this;
}
}