src/Entity/CardTransaction.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CardTransactionRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCardTransactionRepository::class)]
  7. class CardTransaction
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'cardTransactions')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?Card $card null;
  16.     #[ORM\Column]
  17.     private ?int $pointsAdded null;
  18.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  19.     private ?\DateTimeInterface $transactionDate null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getCard(): ?Card
  25.     {
  26.         return $this->card;
  27.     }
  28.     public function setCard(?Card $card): void
  29.     {
  30.         $this->card $card;
  31.     }
  32.     public function getPointsAdded(): ?int
  33.     {
  34.         return $this->pointsAdded;
  35.     }
  36.     public function setPointsAdded(int $pointsAdded): static
  37.     {
  38.         $this->pointsAdded $pointsAdded;
  39.         return $this;
  40.     }
  41.     public function getTransactionDate(): ?\DateTimeInterface
  42.     {
  43.         return $this->transactionDate;
  44.     }
  45.     public function setTransactionDate(\DateTimeInterface $transactionDate): static
  46.     {
  47.         $this->transactionDate $transactionDate;
  48.         return $this;
  49.     }
  50. }