src/Entity/CRM/OrderNote.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\OrderNoteRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassOrderNoteRepository::class)]
  9. class OrderNote
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  16.     private ?\DateTimeInterface $dateAdded null;
  17.     #[ORM\Column(typeTypes::TEXT)]
  18.     private ?string $description null;
  19.     #[ORM\ManyToOne(inversedBy'orderNotes')]
  20.     private ?Order $orderInstance null;
  21.     #[ORM\ManyToOne(inversedBy'orderNotes')]
  22.     private ?Admin $admin null;
  23.     #[ORM\ManyToOne(inversedBy'orderNotes')]
  24.     private ?Consultant $consultant null;
  25.     #[ORM\ManyToOne(inversedBy'orderNotes')]
  26.     private ?OrderNoteType $orderNoteType null;
  27.     #[ORM\ManyToOne(inversedBy'orderEditedNotes')]
  28.     private ?Admin $lastEditedBy null;
  29.     #[ORM\ManyToOne(inversedBy'orderNotes')]
  30.     private ?BhpInspector $bhpInspector null;
  31.     #[ORM\OneToMany(mappedBy'orderNoteForExtension'targetEntityOrder::class)]
  32.     private Collection $extensionOrders;
  33.     public function __construct()
  34.     {
  35.         $this->extensionOrders = new ArrayCollection();
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getDateAdded(): ?\DateTimeInterface
  42.     {
  43.         return $this->dateAdded;
  44.     }
  45.     public function setDateAdded(\DateTimeInterface $dateAdded): static
  46.     {
  47.         $this->dateAdded $dateAdded;
  48.         return $this;
  49.     }
  50.     public function getDescription(): ?string
  51.     {
  52.         return $this->description;
  53.     }
  54.     public function setDescription(string $description): static
  55.     {
  56.         $this->description $description;
  57.         return $this;
  58.     }
  59.     public function getOrderInstance(): ?Order
  60.     {
  61.         return $this->orderInstance;
  62.     }
  63.     public function setOrderInstance(?Order $orderInstance): static
  64.     {
  65.         $this->orderInstance $orderInstance;
  66.         return $this;
  67.     }
  68.     public function getAdmin(): ?Admin
  69.     {
  70.         return $this->admin;
  71.     }
  72.     public function setAdmin(?Admin $admin): static
  73.     {
  74.         $this->admin $admin;
  75.         return $this;
  76.     }
  77.     public function getConsultant(): ?Consultant
  78.     {
  79.         return $this->consultant;
  80.     }
  81.     public function setConsultant(?Consultant $consultant): static
  82.     {
  83.         $this->consultant $consultant;
  84.         return $this;
  85.     }
  86.     public function getOrderNoteType(): ?OrderNoteType
  87.     {
  88.         return $this->orderNoteType;
  89.     }
  90.     public function setOrderNoteType(?OrderNoteType $orderNoteType): static
  91.     {
  92.         $this->orderNoteType $orderNoteType;
  93.         return $this;
  94.     }
  95.     public function getLastEditedBy(): ?Admin
  96.     {
  97.         return $this->lastEditedBy;
  98.     }
  99.     public function setLastEditedBy(?Admin $lastEditedBy): static
  100.     {
  101.         $this->lastEditedBy $lastEditedBy;
  102.         return $this;
  103.     }
  104.     public function getBhpInspector(): ?BhpInspector
  105.     {
  106.         return $this->bhpInspector;
  107.     }
  108.     public function setBhpInspector(?BhpInspector $bhpInspector): static
  109.     {
  110.         $this->bhpInspector $bhpInspector;
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return Collection<int, Order>
  115.      */
  116.     public function getExtensionOrders(): Collection
  117.     {
  118.         return $this->extensionOrders;
  119.     }
  120.     public function addExtensionOrder(Order $extensionOrder): static
  121.     {
  122.         if (!$this->extensionOrders->contains($extensionOrder)) {
  123.             $this->extensionOrders->add($extensionOrder);
  124.             $extensionOrder->setOrderNoteForExtension($this);
  125.         }
  126.         return $this;
  127.     }
  128.     public function removeExtensionOrder(Order $extensionOrder): static
  129.     {
  130.         if ($this->extensionOrders->removeElement($extensionOrder)) {
  131.             // set the owning side to null (unless already changed)
  132.             if ($extensionOrder->getOrderNoteForExtension() === $this) {
  133.                 $extensionOrder->setOrderNoteForExtension(null);
  134.             }
  135.         }
  136.         return $this;
  137.     }
  138. }