<?phpnamespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\CheckTypeRepository") * @ORM\Table(name="check_types", indexes={@ORM\Index(name="id_index", columns={"id"})}) */class CheckType{ /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\Column(type="string", unique=true, length=25, nullable=false) */ private $name; /** * @ORM\Column(type="boolean", nullable=false) */ private $status; /** * @ORM\ManyToMany(targetEntity="App\Entity\Customer", mappedBy="checkTypes") */ private $customers; /** * @ORM\ManyToMany(targetEntity="App\Entity\Brand", mappedBy="checkTypes") */ private $brands; public function __construct() { $this->customers = new ArrayCollection(); $this->brands = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getStatus(): ?bool { return $this->status; } public function setStatus(bool $status): self { $this->status = $status; return $this; } /** * @return Collection|Customer[] */ public function getCustomers(): Collection { return $this->customers; } public function addCustomer(Customer $customer): self { if (!$this->customers->contains($customer)) { $this->customers[] = $customer; $customer->addCheckType($this); } return $this; } public function removeCustomer(Customer $customer): self { if ($this->customers->removeElement($customer)) { $customer->removeCheckType($this); } return $this; } /** * @return Collection|Brand[] */ public function getBrands(): Collection { return $this->brands; } public function addBrand(Brand $brand): self { if (!$this->brands->contains($brand)) { $this->brands[] = $brand; $brand->addCheckType($this); } return $this; } public function removeBrand(Brand $brand): self { if ($this->brands->removeElement($brand)) { $brand->removeCheckType($this); } return $this; }}