src/Entity/Gos/Embeddable/BufferedShopOrderPart.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Embeddable;
  3. use App\Enum\BufferedShopOrderStatus;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /** @ORM\Embeddable */
  6. final class BufferedShopOrderPart
  7. {
  8.     /** @ORM\Column(type="boolean", options={"comment": "Sklep Buforowy GOS - zamówienie jest odpowiednie dla Sklepu Buforowego"}) */
  9.     private bool $isEligible false;
  10.     /** @ORM\Column(type="string", length=255, nullable=true, enumType="App\Enum\BufferedShopOrderStatus", options={"comment": "Sklep Buforowy GOS - status zamówienia"}) */
  11.     private ?BufferedShopOrderStatus $status;
  12.     /** @ORM\Column(type="datetime_immutable", nullable=true, options={"comment": "Sklep Buforowy GOS - data eksportu"}) */
  13.     private ?\DateTimeImmutable $exportedAt;
  14.     /** @ORM\Column(type="datetime_immutable", nullable=true, options={"comment": "Sklep Buforowy GOS - data akceptacji"}) */
  15.     private ?\DateTimeImmutable $acceptedAt;
  16.     /** @ORM\Column(type="datetime_immutable", nullable=true, options={"comment": "Sklep Buforowy GOS - data wydruku"}) */
  17.     private ?\DateTimeImmutable $printedAt;
  18.     /** @ORM\Column(type="boolean", options={"comment": "Sklep Buforowy GOS - zamówienie jest priorytetowe"}) */
  19.     private bool $isPriority false;
  20.     /** @ORM\Column(type="string", length=255, nullable=true, options={"comment": "Sklep Buforowy GOS - komentarz"}) */
  21.     private ?string $comment;
  22.     public function __construct()
  23.     {
  24.         $this->status BufferedShopOrderStatus::Accepted;
  25.         $this->acceptedAt = new \DateTimeImmutable();
  26.     }
  27.     public function isEligible(): bool
  28.     {
  29.         return $this->isEligible;
  30.     }
  31.     public function setIsEligible(bool $isEligible): self
  32.     {
  33.         $this->isEligible $isEligible;
  34.         return $this;
  35.     }
  36.     public function getStatus(): ?BufferedShopOrderStatus
  37.     {
  38.         return $this->status;
  39.     }
  40.     public function setStatus(BufferedShopOrderStatus $status): self
  41.     {
  42.         $this->status $status;
  43.         return $this;
  44.     }
  45.     public function getExportedAt(): ?\DateTimeImmutable
  46.     {
  47.         return $this->exportedAt;
  48.     }
  49.     public function setExportedAt(?\DateTimeImmutable $exportedAt): self
  50.     {
  51.         $this->exportedAt $exportedAt;
  52.         return $this;
  53.     }
  54.     public function getAcceptedAt(): ?\DateTimeImmutable
  55.     {
  56.         return $this->acceptedAt;
  57.     }
  58.     public function setAcceptedAt(?\DateTimeImmutable $acceptedAt): self
  59.     {
  60.         $this->acceptedAt $acceptedAt;
  61.         return $this;
  62.     }
  63.     public function getPrintedAt(): ?\DateTimeImmutable
  64.     {
  65.         return $this->printedAt;
  66.     }
  67.     public function setPrintedAt(?\DateTimeImmutable $printedAt): self
  68.     {
  69.         $this->printedAt $printedAt;
  70.         return $this;
  71.     }
  72.     public function isPriority(): bool
  73.     {
  74.         return $this->isPriority;
  75.     }
  76.     public function setIsPriority(bool $isPriority): self
  77.     {
  78.         $this->isPriority $isPriority;
  79.         return $this;
  80.     }
  81.     public function getComment(): ?string
  82.     {
  83.         return $this->comment;
  84.     }
  85.     public function setComment(?string $comment): self
  86.     {
  87.         $this->comment $comment !== '' $comment null;
  88.         return $this;
  89.     }
  90. }