src/Entity/CRM/BhpStatus.php line 11

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\BhpStatusRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassBhpStatusRepository::class)]
  8. class BhpStatus
  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\Column]
  17.     private ?bool $isActive null;
  18.     #[ORM\Column]
  19.     private ?bool $isContract null;
  20.     #[ORM\Column]
  21.     private ?bool $isBlockedForBhp null;
  22.     #[ORM\Column]
  23.     private ?bool $isEnded null;
  24.     #[ORM\OneToMany(mappedBy'bhpStatus'targetEntityBhpOrderProduct::class)]
  25.     private Collection $BhpOrderProducts;
  26.     public function __construct()
  27.     {
  28.         $this->BhpOrderProducts = new ArrayCollection();
  29.     }
  30.     public function __toString(): string
  31.     {
  32.         return $this->getId() . ' ' $this->getName();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getName(): ?string
  39.     {
  40.         return $this->name;
  41.     }
  42.     public function setName(string $name): static
  43.     {
  44.         $this->name $name;
  45.         return $this;
  46.     }
  47.     public function isIsActive(): ?bool
  48.     {
  49.         return $this->isActive;
  50.     }
  51.     public function setIsActive(bool $isActive): static
  52.     {
  53.         $this->isActive $isActive;
  54.         return $this;
  55.     }
  56.     public function isIsContract(): ?bool
  57.     {
  58.         return $this->isContract;
  59.     }
  60.     public function setIsContract(bool $isContract): static
  61.     {
  62.         $this->isContract $isContract;
  63.         return $this;
  64.     }
  65.     public function isIsBlockedForBhp(): ?bool
  66.     {
  67.         return $this->isBlockedForBhp;
  68.     }
  69.     public function setIsBlockedForBhp(bool $isBlockedForBhp): static
  70.     {
  71.         $this->isBlockedForBhp $isBlockedForBhp;
  72.         return $this;
  73.     }
  74.     public function isIsEnded(): ?bool
  75.     {
  76.         return $this->isEnded;
  77.     }
  78.     public function setIsEnded(bool $isEnded): static
  79.     {
  80.         $this->isEnded $isEnded;
  81.         return $this;
  82.     }
  83.     /**
  84.      * @return Collection<int, BhpOrderProduct>
  85.      */
  86.     public function getBhpOrderProducts(): Collection
  87.     {
  88.         return $this->BhpOrderProducts;
  89.     }
  90.     public function addBhpOrderProduct(BhpOrderProduct $BhpOrderProduct): static
  91.     {
  92.         if (!$this->BhpOrderProducts->contains($BhpOrderProduct)) {
  93.             $this->BhpOrderProducts->add($BhpOrderProduct);
  94.             $BhpOrderProduct->setBhpStatus($this);
  95.         }
  96.         return $this;
  97.     }
  98.     public function removeBhpOrderProduct(BhpOrderProduct $BhpOrderProduct): static
  99.     {
  100.         if ($this->BhpOrderProducts->removeElement($BhpOrderProduct)) {
  101.             // set the owning side to null (unless already changed)
  102.             if ($BhpOrderProduct->getBhpStatus() === $this) {
  103.                 $BhpOrderProduct->setBhpStatus(null);
  104.             }
  105.         }
  106.         return $this;
  107.     }
  108. }