src/Flexy/ShopBundle/Entity/Order/Adjustment.php line 11

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Order;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Flexy\ShopBundle\Repository\Order\AdjustmentRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ApiResource]
  7. #[ORM\Entity(repositoryClassAdjustmentRepository::class)]
  8. class Adjustment
  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\ManyToOne(targetEntityOrder::class, inversedBy'adjustments')]
  17.     private ?\App\Flexy\ShopBundle\Entity\Order\Order $parentOrder null;
  18.     #[ORM\Column(type'float')]
  19.     private ?float $amount null;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private ?string $type null;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private ?string $label null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getCreatedAt(): ?\DateTimeImmutable
  29.     {
  30.         return $this->createdAt;
  31.     }
  32.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  33.     {
  34.         $this->createdAt $createdAt;
  35.         return $this;
  36.     }
  37.     public function getParentOrder(): ?Order
  38.     {
  39.         return $this->parentOrder;
  40.     }
  41.     public function setParentOrder(?Order $parentOrder): self
  42.     {
  43.         $this->parentOrder $parentOrder;
  44.         return $this;
  45.     }
  46.     public function getAmount(): ?float
  47.     {
  48.         return $this->amount;
  49.     }
  50.     public function setAmount(float $amount): self
  51.     {
  52.         $this->amount $amount;
  53.         return $this;
  54.     }
  55.     public function getType(): ?string
  56.     {
  57.         return $this->type;
  58.     }
  59.     public function setType(?string $type): self
  60.     {
  61.         $this->type $type;
  62.         return $this;
  63.     }
  64.     public function getLabel(): ?string
  65.     {
  66.         return $this->label;
  67.     }
  68.     public function setLabel(?string $label): self
  69.     {
  70.         $this->label $label;
  71.         return $this;
  72.     }
  73. }