<?phpdeclare(strict_types=1);namespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use App\Repository\CsptypeRepository;/** * Csptype * * @ORM\Table(name="csptype") * @ORM\Entity(repositoryClass=CsptypeRepository::class) */class Csptype{ /** * @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", mappedBy="csptype") */ private $csp; /** * Constructor */ public function __construct() { $this->csp = 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 getCsp(): Collection { return $this->csp; } public function addCsp(Csp $csp): self { if (!$this->csp->contains($csp)) { $this->csp[] = $csp; $csp->addCsptype($this); } return $this; } public function removeCsp(Csp $csp): self { if ($this->csp->removeElement($csp)) { $csp->removeCsptype($this); } return $this; }}