src/Entity/CRM/ImplementerOrderProduct.php line 14

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Entity\CRM\OrderProduct;
  4. use App\Entity\CRM\Product;
  5. use App\Repository\ImplementerOrderProductRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\DBAL\Types\Types;
  9. use Doctrine\ORM\Mapping as ORM;
  10. #[ORM\Entity(repositoryClassImplementerOrderProductRepository::class)]
  11. class ImplementerOrderProduct
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\ManyToOne(inversedBy'implementerOrderProducts')]
  18.     #[ORM\JoinColumn(nullabletrue)]
  19.     private ?ImplementerOrderProductStatus $status null;
  20.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  21.     private ?string $implementerOrderProductNotes null;
  22.     #[ORM\OneToMany(mappedBy'implementerOrderProduct'targetEntityImplementerOrderHistory::class, orphanRemovaltrue)]
  23.     private Collection $implementerOrderHistories;
  24.     #[ORM\ManyToMany(targetEntityImplementer::class, inversedBy'implementerOrderProducts')]
  25.     private Collection $implementer;
  26.     #[ORM\ManyToOne(inversedBy'implementerOrderProducts')]
  27.     private ?Product $product null;
  28.     #[ORM\ManyToOne(inversedBy'implementerOrderProducts')]
  29.     #[ORM\JoinColumn(nullablefalse)]
  30.     private ?OrderProduct $orderProduct null;
  31.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  32.     private ?\DateTimeInterface $receivedAnswers null;
  33.     public function __construct()
  34.     {
  35.         $this->implementerOrderHistories = new ArrayCollection();
  36.         $this->implementer = new ArrayCollection();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getStatus(): ?ImplementerOrderProductStatus
  43.     {
  44.         return $this->status;
  45.     }
  46.     public function setStatus(?ImplementerOrderProductStatus $status): static
  47.     {
  48.         $this->status $status;
  49.         return $this;
  50.     }
  51.     public function getImplementerOrderProductNotes(): ?string
  52.     {
  53.         return $this->implementerOrderProductNotes;
  54.     }
  55.     public function setImplementerOrderProductNotes(?string $implementerOrderProductNotes): static
  56.     {
  57.         $this->implementerOrderProductNotes $implementerOrderProductNotes;
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Collection<int, ImplementerOrderHistory>
  62.      */
  63.     public function getImplementerOrderHistories(): Collection
  64.     {
  65.         return $this->implementerOrderHistories;
  66.     }
  67.     public function addImplementerOrderHistory(ImplementerOrderHistory $implementerOrderHistory): static
  68.     {
  69.         if (!$this->implementerOrderHistories->contains($implementerOrderHistory)) {
  70.             $this->implementerOrderHistories->add($implementerOrderHistory);
  71.             $implementerOrderHistory->setImplementerOrderProduct($this);
  72.         }
  73.         return $this;
  74.     }
  75.     public function removeImplementerOrderHistory(ImplementerOrderHistory $implementerOrderHistory): static
  76.     {
  77.         if ($this->implementerOrderHistories->removeElement($implementerOrderHistory)) {
  78.             // set the owning side to null (unless already changed)
  79.             if ($implementerOrderHistory->getImplementerOrderProduct() === $this) {
  80.                 $implementerOrderHistory->setImplementerOrderProduct(null);
  81.             }
  82.         }
  83.         return $this;
  84.     }
  85.     /**
  86.      * @return Collection<int, Implementer>
  87.      */
  88.     public function getImplementer(): Collection
  89.     {
  90.         return $this->implementer;
  91.     }
  92.     public function addImplementer(Implementer $implementer): static
  93.     {
  94.         if (!$this->implementer->contains($implementer)) {
  95.             $this->implementer->add($implementer);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removeImplementer(Implementer $implementer): static
  100.     {
  101.         $this->implementer->removeElement($implementer);
  102.         return $this;
  103.     }
  104.     public function getProduct(): ?Product
  105.     {
  106.         return $this->product;
  107.     }
  108.     public function setProduct(?Product $product): static
  109.     {
  110.         $this->product $product;
  111.         return $this;
  112.     }
  113.     public function getOrderProduct(): ?OrderProduct
  114.     {
  115.         return $this->orderProduct;
  116.     }
  117.     public function setOrderProduct(?OrderProduct $orderProduct): static
  118.     {
  119.         $this->orderProduct $orderProduct;
  120.         return $this;
  121.     }
  122.     public function getReceivedAnswers(): ?\DateTimeInterface
  123.     {
  124.         return $this->receivedAnswers;
  125.     }
  126.     public function setReceivedAnswers(?\DateTimeInterface $receivedAnswers): static
  127.     {
  128.         $this->receivedAnswers $receivedAnswers;
  129.         return $this;
  130.     }
  131. }