src/Entity/Retrait.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RetraitRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassRetraitRepository::class)]
  6. class Retrait
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'retraits')]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private ?User $user null;
  15.     #[ORM\Column]
  16.     #[Groups(['read:retraits:item'])]
  17.     private ?float $montant null;
  18.     #[ORM\Column]
  19.     private ?bool $isDone null;
  20.     #[ORM\Column(length50)]
  21.     #[Groups(['read:retraits:item'])]
  22.     private ?string $numeroTelephone null;
  23.     #[ORM\ManyToOne(inversedBy'retraits')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?PaymentMethod $paymentMethod null;
  26.     #[ORM\Column]
  27.     private ?\DateTimeImmutable $createdAt null;
  28.     #[ORM\Column(length50nullabletrue)]
  29.     #[Groups(['read:user:item'])]
  30.     private ?string $status null;
  31.     #[ORM\Column(length150nullabletrue)]
  32.     #[Groups(['read:user:item'])]
  33.     private ?string $transactionReference null;
  34.     public function __construct()
  35.     {
  36.         $this->createdAt = new \DateTimeImmutable();
  37.         $this->isDone false;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getUser(): ?User
  44.     {
  45.         return $this->user;
  46.     }
  47.     public function setUser(?User $user): static
  48.     {
  49.         $this->user $user;
  50.         return $this;
  51.     }
  52.     public function getMontant(): ?float
  53.     {
  54.         return $this->montant;
  55.     }
  56.     public function setMontant(float $montant): static
  57.     {
  58.         $this->montant $montant;
  59.         return $this;
  60.     }
  61.     public function isIsDone(): ?bool
  62.     {
  63.         return $this->isDone;
  64.     }
  65.     public function setIsDone(bool $isDone): static
  66.     {
  67.         $this->isDone $isDone;
  68.         return $this;
  69.     }
  70.     public function getNumeroTelephone(): ?string
  71.     {
  72.         return $this->numeroTelephone;
  73.     }
  74.     public function setNumeroTelephone(string $numeroTelephone): static
  75.     {
  76.         $this->numeroTelephone $numeroTelephone;
  77.         return $this;
  78.     }
  79.     public function getPaymentMethod(): ?PaymentMethod
  80.     {
  81.         return $this->paymentMethod;
  82.     }
  83.     public function setPaymentMethod(?PaymentMethod $paymentMethod): static
  84.     {
  85.         $this->paymentMethod $paymentMethod;
  86.         return $this;
  87.     }
  88.     public function getCreatedAt(): ?\DateTimeImmutable
  89.     {
  90.         return $this->createdAt;
  91.     }
  92.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  93.     {
  94.         $this->createdAt $createdAt;
  95.         return $this;
  96.     }
  97.     public function getStatus(): ?string
  98.     {
  99.         return $this->status;
  100.     }
  101.     public function setStatus(?string $status): static
  102.     {
  103.         $this->status $status;
  104.         return $this;
  105.     }
  106.     public function getTransactionReference(): ?string
  107.     {
  108.         return $this->transactionReference;
  109.     }
  110.     public function setTransactionReference(?string $transactionReference): static
  111.     {
  112.         $this->transactionReference $transactionReference;
  113.         return $this;
  114.     }
  115. }