<?phpdeclare(strict_types=1);namespace App\Entity;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use App\Repository\CompanyTypeRepository;/** * CompanyType * * @ORM\Table(name="company_type") * @ORM\Entity(repositoryClass=CompanyTypeRepository::class) */class CompanyType{ /** * @var int * * @ORM\Column(name="id", type="smallint", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=80, nullable=false) */ private $name; /** * @var bool * * @ORM\Column(name="last_import", type="boolean", nullable=false) */ private $lastImport = false; /** * @var Collection * * @ORM\ManyToMany(targetEntity=Csp::class, mappedBy="companyTypes") */ private $csps; /** * Constructor */ public function __construct() { $this->csps = 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 isLastImport(): ?bool { return $this->lastImport; } public function setLastImport(bool $lastImport): self { $this->lastImport = $lastImport; return $this; } /** * @return Collection<int, Csp> */ public function getCsps(): Collection { return $this->csps; } public function addCsp(Csp $csp): self { if (!$this->csps->contains($csp)) { $this->csps->add($csp); $csp->addCompanyType($this); } return $this; } public function removeCsp(Csp $csp): self { if ($this->csps->removeElement($csp)) { $csp->removeCompanyType($this); } return $this; }}