src/Entity/CRM/ImplementerOrderProductStatus.php line 11

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\ImplementerOrderProductStatusRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassImplementerOrderProductStatusRepository::class)]
  8. class ImplementerOrderProductStatus
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $name null;
  16.     #[ORM\OneToMany(mappedBy'status'targetEntityImplementerOrderProduct::class)]
  17.     private Collection $implementerOrderProducts;
  18.     #[ORM\Column]
  19.     private ?bool $isActive null;
  20.     #[ORM\Column]
  21.     private ?bool $ending null;
  22.     #[ORM\Column]
  23.     private ?bool $notNeeded null;
  24.     public function __toString(): string
  25.     {
  26.         return $this->name;
  27.     }
  28.     public function __construct()
  29.     {
  30.         $this->implementerOrderProducts = new ArrayCollection();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getName(): ?string
  37.     {
  38.         return $this->name;
  39.     }
  40.     public function setName(string $name): static
  41.     {
  42.         $this->name $name;
  43.         return $this;
  44.     }
  45.     /**
  46.      * @return Collection<int, ImplementerOrderProduct>
  47.      */
  48.     public function getImplementerOrderProducts(): Collection
  49.     {
  50.         return $this->implementerOrderProducts;
  51.     }
  52.     public function addImplementerOrderProduct(ImplementerOrderProduct $implementerOrderProduct): static
  53.     {
  54.         if (!$this->implementerOrderProducts->contains($implementerOrderProduct)) {
  55.             $this->implementerOrderProducts->add($implementerOrderProduct);
  56.             $implementerOrderProduct->setStatus($this);
  57.         }
  58.         return $this;
  59.     }
  60.     public function removeImplementerOrderProduct(ImplementerOrderProduct $implementerOrderProduct): static
  61.     {
  62.         if ($this->implementerOrderProducts->removeElement($implementerOrderProduct)) {
  63.             // set the owning side to null (unless already changed)
  64.             if ($implementerOrderProduct->getStatus() === $this) {
  65.                 $implementerOrderProduct->setStatus(null);
  66.             }
  67.         }
  68.         return $this;
  69.     }
  70.     public function isIsActive(): ?bool
  71.     {
  72.         return $this->isActive;
  73.     }
  74.     public function setIsActive(bool $isActive): static
  75.     {
  76.         $this->isActive $isActive;
  77.         return $this;
  78.     }
  79.     public function isEnding(): ?bool
  80.     {
  81.         return $this->ending;
  82.     }
  83.     public function setEnding(bool $ending): static
  84.     {
  85.         $this->ending $ending;
  86.         return $this;
  87.     }
  88.     public function isNotNeeded(): ?bool
  89.     {
  90.         return $this->notNeeded;
  91.     }
  92.     public function setNotNeeded(bool $notNeeded): static
  93.     {
  94.         $this->notNeeded $notNeeded;
  95.         return $this;
  96.     }
  97. }