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

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Payment;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Flexy\ShopBundle\Entity\Shipping\CashBox;
  5. use App\Repository\Flexy\ShopBundle\Entity\Payment\TransactionRepository;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. #[ORM\Entity(repositoryClassTransactionRepository::class)]
  10. #[ApiResource]
  11. class Transaction
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column]
  18.     private ?float $amount 0;
  19.     #[ORM\Column(length255)]
  20.     private ?string $purpose null;
  21.     #[ORM\ManyToOne(inversedBy'transactions')]
  22.     private ?CashBox $cashBox null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $validatedAt null;
  25.     #[ORM\Column(nullabletrue)]
  26.     private ?float $claimedAmount null;
  27.     #[ORM\ManyToOne(inversedBy'transactions')]
  28.     private ?TransactionList $transactionList null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $reference null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     #[Gedmo\Blameable(on'create')]
  33.     private ?string $createdBy null;
  34.     #[ORM\Column(length255nullabletrue)]
  35.     #[Gedmo\Blameable(on'update')]
  36.     private ?string $updatedBy null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $type null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $fullReference null;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getAmount(): ?float
  46.     {
  47.         return $this->amount;
  48.     }
  49.     public function setAmount(float $amount): self
  50.     {
  51.         $this->amount $amount;
  52.         return $this;
  53.     }
  54.     public function getPurpose(): ?string
  55.     {
  56.         return $this->purpose;
  57.     }
  58.     public function setPurpose(string $purpose): self
  59.     {
  60.         $this->purpose $purpose;
  61.         return $this;
  62.     }
  63.     public function getCashBox(): ?CashBox
  64.     {
  65.         return $this->cashBox;
  66.     }
  67.     public function setCashBox(?CashBox $cashBox): self
  68.     {
  69.         $this->cashBox $cashBox;
  70.         return $this;
  71.     }
  72.     public function getValidatedAt(): ?\DateTimeInterface
  73.     {
  74.         return $this->validatedAt;
  75.     }
  76.     public function setValidatedAt(?\DateTimeInterface $validatedAt): self
  77.     {
  78.         $this->validatedAt $validatedAt;
  79.         return $this;
  80.     }
  81.     public function getClaimedAmount(): ?float
  82.     {
  83.         return $this->claimedAmount;
  84.     }
  85.     public function setClaimedAmount(?float $claimedAmount): self
  86.     {
  87.         $this->claimedAmount $claimedAmount;
  88.         return $this;
  89.     }
  90.     public function getTransactionList(): ?TransactionList
  91.     {
  92.         return $this->transactionList;
  93.     }
  94.     public function setTransactionList(?TransactionList $transactionList): self
  95.     {
  96.         $this->transactionList $transactionList;
  97.         return $this;
  98.     }
  99.     public function getReference(): ?string
  100.     {
  101.         return $this->reference;
  102.     }
  103.     public function setReference(string $reference): self
  104.     {
  105.         $this->reference $reference;
  106.         return $this;
  107.     }
  108.     public function getCreatedBy(): ?string
  109.     {
  110.         return $this->createdBy;
  111.     }
  112.     public function setCreatedBy(?string $createdBy): self
  113.     {
  114.         $this->createdBy $createdBy;
  115.         return $this;
  116.     }
  117.     public function getUpdatedBy(): ?string
  118.     {
  119.         return $this->updatedBy;
  120.     }
  121.     public function setUpdatedBy(?string $updatedBy): self
  122.     {
  123.         $this->updatedBy $updatedBy;
  124.         return $this;
  125.     }
  126.     public function getType(): ?string
  127.     {
  128.         return $this->type;
  129.     }
  130.     public function setType(?string $type): self
  131.     {
  132.         $this->type $type;
  133.         return $this;
  134.     }
  135.     public function getFullReference(): ?string
  136.     {
  137.         return $this->fullReference;
  138.     }
  139.     public function setFullReference(?string $fullReference): self
  140.     {
  141.         $this->fullReference $fullReference;
  142.         return $this;
  143.     }
  144. }