src/Entity/Payment.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PaymentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassPaymentRepository::class)]
  6. class Payment
  7. {
  8.     public const MODES = ["species"=>"Espèce""bank-check"=>"Chéque""credit"=>"Credit"];
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'payments',cascade: ['persist'])]
  14.     private ?Order $orderRef null;
  15.     #[ORM\Column]
  16.     private ?float $amount null;
  17.     #[ORM\Column(length25)]
  18.     private ?string $mode null;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getOrderRef(): ?Order
  24.     {
  25.         return $this->orderRef;
  26.     }
  27.     public function setOrderRef(?Order $orderRef): self
  28.     {
  29.         $this->orderRef $orderRef;
  30.         return $this;
  31.     }
  32.     public function getAmount(): ?float
  33.     {
  34.         return $this->amount;
  35.     }
  36.     public function setAmount(float $amount): self
  37.     {
  38.         $this->amount $amount;
  39.         return $this;
  40.     }
  41.     public function getMode(): ?string
  42.     {
  43.         return $this->mode;
  44.     }
  45.     public function setMode(string $mode): self
  46.     {
  47.         $this->mode $mode;
  48.         return $this;
  49.     }
  50. }