src/Entity/CRM/Implementer.php line 12
<?phpnamespace App\Entity\CRM;use App\Entity\CRM\Order;use App\Repository\ImplementerRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ImplementerRepository::class)]class Implementer{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\OneToOne(inversedBy: 'implementer', cascade: ['persist', 'remove'])]#[ORM\JoinColumn(nullable: false)]private ?Admin $admin = null;#[ORM\Column]private ?bool $isActive = null;#[ORM\Column(length: 255)]private ?string $backColor = null;#[ORM\Column]private ?bool $forBhp = null;#[ORM\ManyToMany(targetEntity: Order::class, mappedBy: 'implementer')]private Collection $orders;#[ORM\ManyToMany(targetEntity: ImplementerOrderProduct::class, mappedBy: 'implementer')]private Collection $implementerOrderProducts;#[ORM\ManyToMany(targetEntity: BhpOrderProduct::class, mappedBy: 'implementer')]private Collection $bhpOrderProducts;#[ORM\Column]private ?int $sortOrder = 999;public function __construct(){$this->orders = new ArrayCollection();$this->implementerOrderProducts = new ArrayCollection();$this->bhpOrderProducts = new ArrayCollection();}public function __toString(){return $this->getAdmin()->getFirstName().' '.$this->getAdmin()->getLastName();}public function getId(): ?int{return $this->id;}public function getAdmin(): ?Admin{return $this->admin;}public function setAdmin(Admin $admin): self{$this->admin = $admin;return $this;}public function isIsActive(): ?bool{return $this->isActive;}public function setIsActive(bool $isActive): self{$this->isActive = $isActive;return $this;}public function getBackColor(): ?string{return $this->backColor;}public function setBackColor(string $backColor): self{$this->backColor = $backColor;return $this;}public function isForBhp(): ?bool{return $this->forBhp;}public function setForBhp(bool $forBhp): self{$this->forBhp = $forBhp;return $this;}/*** @return Collection<int, Order>*/public function getOrders(): Collection{return $this->orders;}public function addOrder(Order $order): self{if (!$this->orders->contains($order)) {$this->orders->add($order);$order->addImplementer($this);}return $this;}public function removeOrder(Order $order): self{if ($this->orders->removeElement($order)) {$order->removeImplementer($this);}return $this;}/*** @return Collection<int, ImplementerOrderProduct>*/public function getImplementerOrderProducts(): Collection{return $this->implementerOrderProducts;}public function addImplementerOrderProduct(ImplementerOrderProduct $implementerOrderProduct): static{if (!$this->implementerOrderProducts->contains($implementerOrderProduct)) {$this->implementerOrderProducts->add($implementerOrderProduct);$implementerOrderProduct->addImplementer($this);}return $this;}public function removeImplementerOrderProduct(ImplementerOrderProduct $implementerOrderProduct): static{if ($this->implementerOrderProducts->removeElement($implementerOrderProduct)) {$implementerOrderProduct->removeImplementer($this);}return $this;}/*** @return Collection<int, BhpOrderProduct>*/public function getBhpOrderProducts(): Collection{return $this->bhpOrderProducts;}public function addBhpOrderProduct(BhpOrderProduct $bhpOrderProduct): static{if (!$this->bhpOrderProducts->contains($bhpOrderProduct)) {$this->bhpOrderProducts->add($bhpOrderProduct);$bhpOrderProduct->addImplementer($this);}return $this;}public function removeBhpOrderProduct(BhpOrderProduct $bhpOrderProduct): static{if ($this->bhpOrderProducts->removeElement($bhpOrderProduct)) {$bhpOrderProduct->removeImplementer($this);}return $this;}public function getSortOrder(): ?int{return $this->sortOrder;}public function setSortOrder(int $sortOrder): static{$this->sortOrder = $sortOrder;return $this;}}