<?phpnamespace App\Entity;use App\Repository\TgiRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: TgiRepository::class)]class Tgi{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 40)] private ?string $gouvId = null; #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\Column(length: 255)] private ?string $address1 = null; #[ORM\Column(length: 255, nullable: true)] private ?string $address2 = null; #[ORM\Column(length: 10)] private ?string $zipCode = null; #[ORM\Column(length: 255)] private ?string $city = null; #[ORM\Column] private ?bool $deleted = null; #[ORM\OneToMany(mappedBy: 'tgi', targetEntity: City::class)] private Collection $cities; public function __construct() { $this->cities = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getGouvId(): ?string { return $this->gouvId; } public function setGouvId(string $gouvId): static { $this->gouvId = $gouvId; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getAddress1(): ?string { return $this->address1; } public function setAddress1(string $address1): static { $this->address1 = $address1; return $this; } public function getAddress2(): ?string { return $this->address2; } public function setAddress2(?string $address2): static { $this->address2 = $address2; return $this; } public function getZipCode(): ?string { return $this->zipCode; } public function setZipCode(string $zipCode): static { $this->zipCode = $zipCode; return $this; } public function getCity(): ?string { return $this->city; } public function setCity(string $city): static { $this->city = $city; return $this; } public function isDeleted(): ?bool { return $this->deleted; } public function setDeleted(bool $deleted): static { $this->deleted = $deleted; return $this; } /** * @return Collection<int, City> */ public function getCities(): Collection { return $this->cities; } public function addCity(City $city): static { if (!$this->cities->contains($city)) { $this->cities->add($city); $city->setTgi($this); } return $this; } public function removeCity(City $city): static { if ($this->cities->removeElement($city)) { // set the owning side to null (unless already changed) if ($city->getTgi() === $this) { $city->setTgi(null); } } return $this; }}