src/Entity/Municipio.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MunicipioRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassMunicipioRepository::class)]
  8. class Municipio
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length250nullabletrue)]
  15.     private $name;
  16.     #[ORM\Column(type'string'length100)]
  17.     private $cod;
  18.     // #[ORM\OneToMany(mappedBy: 'adminunitname', targetEntity: Project::class)]
  19.     // private Collection $projects;
  20.     public function __construct()
  21.     {
  22.         $this->projects = new ArrayCollection();
  23.     }
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getName(): ?string
  29.     {
  30.         return $this->adminunit;
  31.     }
  32.     public function setName(?string $name): self
  33.     {
  34.         $this->name $name;
  35.         return $this;
  36.     }
  37.     public function getCod(): ?string
  38.     {
  39.         return $this->cod;
  40.     }
  41.     public function setCod(string $cod): self
  42.     {
  43.         $this->cod $cod;
  44.         return $this;
  45.     }
  46.     // /**
  47.     //  * @return Collection<int, Project>
  48.     //  */
  49.     // public function getProjects(): Collection
  50.     // {
  51.     //     return $this->projects;
  52.     // }
  53.     // public function addProject(Project $project): static
  54.     // {
  55.     //     if (!$this->projects->contains($project)) {
  56.     //         $this->projects->add($project);
  57.     //         $project->setAdminunitname($this);
  58.     //     }
  59.     //     return $this;
  60.     // }
  61.     // public function removeProject(Project $project): static
  62.     // {
  63.     //     if ($this->projects->removeElement($project)) {
  64.     //         // set the owning side to null (unless already changed)
  65.     //         if ($project->getAdminunitname() === $this) {
  66.     //             $project->setAdminunitname(null);
  67.     //         }
  68.     //     }
  69.     //     return $this;
  70.     // }
  71. }