src/Flexy/ShopBundle/Entity/Payment/Payment.php line 11

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Payment;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Flexy\ShopBundle\Repository\Payment\PaymentRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ApiResource]
  7. #[ORM\Entity(repositoryClassPaymentRepository::class)]
  8. class Payment
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  15.     private ?\DateTimeImmutable $createdAt null;
  16.     #[ORM\Column(type'float')]
  17.     private ?float $amount null;
  18.     #[ORM\Column(type'string'length255)]
  19.     private ?string $state null;
  20.     #[ORM\Column(type'text'nullabletrue)]
  21.     private ?string $description null;
  22.     #[ORM\ManyToOne(targetEntityPaymentMethod::class, inversedBy'payments')]
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     private ?\App\Flexy\ShopBundle\Entity\Payment\PaymentMethod $paymentMethod null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getCreatedAt(): ?\DateTimeImmutable
  30.     {
  31.         return $this->createdAt;
  32.     }
  33.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  34.     {
  35.         $this->createdAt $createdAt;
  36.         return $this;
  37.     }
  38.     public function getAmount(): ?float
  39.     {
  40.         return $this->amount;
  41.     }
  42.     public function setAmount(float $amount): self
  43.     {
  44.         $this->amount $amount;
  45.         return $this;
  46.     }
  47.     public function getState(): ?string
  48.     {
  49.         return $this->state;
  50.     }
  51.     public function setState(string $state): self
  52.     {
  53.         $this->state $state;
  54.         return $this;
  55.     }
  56.     public function getDescription(): ?string
  57.     {
  58.         return $this->description;
  59.     }
  60.     public function setDescription(?string $description): self
  61.     {
  62.         $this->description $description;
  63.         return $this;
  64.     }
  65.     public function getPaymentMethod(): ?PaymentMethod
  66.     {
  67.         return $this->paymentMethod;
  68.     }
  69.     public function setPaymentMethod(?PaymentMethod $paymentMethod): self
  70.     {
  71.         $this->paymentMethod $paymentMethod;
  72.         return $this;
  73.     }
  74. }