<?php
namespace App\Entity;
use App\Repository\CommuneRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CommuneRepository::class)]
class Commune
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $canton = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $commune = null;
#[ORM\ManyToOne(inversedBy: 'communes')]
private ?Territory $territoire = null;
public function getId(): ?int
{
return $this->id;
}
public function getCanton(): ?string
{
return $this->canton;
}
public function setCanton(?string $canton): self
{
$this->canton = $canton;
return $this;
}
public function getCommune(): ?string
{
return $this->commune;
}
public function setCommune(?string $commune): self
{
$this->commune = $commune;
return $this;
}
public function getTerritoire(): ?Territory
{
return $this->territoire;
}
public function setTerritoire(?Territory $territoire): self
{
$this->territoire = $territoire;
return $this;
}
}