src/Flexy/ShopBundle/Entity/Payment/TransactionList.php line 14

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Payment;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\Flexy\ShopBundle\Entity\Payment\TransactionListRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassTransactionListRepository::class)]
  10. #[ApiResource]
  11. class TransactionList
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $createdAt null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $excelDocument null;
  21.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  22.     private ?string $description null;
  23.     #[ORM\OneToMany(mappedBy'transactionList'targetEntityTransaction::class)]
  24.     private Collection $transactions;
  25.     #[ORM\Column(length255)]
  26.     private ?string $type null;
  27.     #[ORM\Column(length255)]
  28.     private ?string $mode null;
  29.     public function __construct()
  30.     {
  31.         $this->transactions = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getCreatedAt(): ?\DateTimeInterface
  38.     {
  39.         return $this->createdAt;
  40.     }
  41.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  42.     {
  43.         $this->createdAt $createdAt;
  44.         return $this;
  45.     }
  46.     public function getExcelDocument(): ?string
  47.     {
  48.         return $this->excelDocument;
  49.     }
  50.     public function setExcelDocument(?string $excelDocument): self
  51.     {
  52.         $this->excelDocument $excelDocument;
  53.         return $this;
  54.     }
  55.     public function getDescription(): ?string
  56.     {
  57.         return $this->description;
  58.     }
  59.     public function setDescription(?string $description): self
  60.     {
  61.         $this->description $description;
  62.         return $this;
  63.     }
  64.     /**
  65.      * @return Collection<int, Transaction>
  66.      */
  67.     public function getTransactions(): Collection
  68.     {
  69.         return $this->transactions;
  70.     }
  71.     public function addTransaction(Transaction $transaction): self
  72.     {
  73.         if (!$this->transactions->contains($transaction)) {
  74.             $this->transactions->add($transaction);
  75.             $transaction->setTransactionList($this);
  76.         }
  77.         return $this;
  78.     }
  79.     public function removeTransaction(Transaction $transaction): self
  80.     {
  81.         if ($this->transactions->removeElement($transaction)) {
  82.             // set the owning side to null (unless already changed)
  83.             if ($transaction->getTransactionList() === $this) {
  84.                 $transaction->setTransactionList(null);
  85.             }
  86.         }
  87.         return $this;
  88.     }
  89.     public function getType(): ?string
  90.     {
  91.         return $this->type;
  92.     }
  93.     public function setType(string $type): self
  94.     {
  95.         $this->type $type;
  96.         return $this;
  97.     }
  98.     public function getMode(): ?string
  99.     {
  100.         return $this->mode;
  101.     }
  102.     public function setMode(string $mode): self
  103.     {
  104.         $this->mode $mode;
  105.         return $this;
  106.     }
  107. }