<?php
namespace App\Entity;
use App\Repository\MunicipioRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MunicipioRepository::class)]
class Municipio
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 250, nullable: true)]
private $name;
#[ORM\Column(type: 'string', length: 100)]
private $cod;
// #[ORM\OneToMany(mappedBy: 'adminunitname', targetEntity: Project::class)]
// private Collection $projects;
public function __construct()
{
$this->projects = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->adminunit;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getCod(): ?string
{
return $this->cod;
}
public function setCod(string $cod): self
{
$this->cod = $cod;
return $this;
}
// /**
// * @return Collection<int, Project>
// */
// public function getProjects(): Collection
// {
// return $this->projects;
// }
// public function addProject(Project $project): static
// {
// if (!$this->projects->contains($project)) {
// $this->projects->add($project);
// $project->setAdminunitname($this);
// }
// return $this;
// }
// public function removeProject(Project $project): static
// {
// if ($this->projects->removeElement($project)) {
// // set the owning side to null (unless already changed)
// if ($project->getAdminunitname() === $this) {
// $project->setAdminunitname(null);
// }
// }
// return $this;
// }
}