<?php
namespace App\Entity\WateringTips;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass="App\Repository\App\TownRepository")
* @ORM\Table(name="Town")
*/
class Town
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private ?string $name;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $department;
/**
* @ORM\Column(type="integer", nullable=true, unique=true)
*/
private ?int $inseeCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $sector1;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $sector2;
/**
* @ORM\Column(type="boolean", nullable=false)
*/
private bool $hasDroughtAlert = false;
public function getId(): ?int
{
return $this->id;
}
public function setId(?int $id): self
{
$this->id = $id;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getDepartment(): ?int
{
return $this->department;
}
public function setDepartment(?int $department): self
{
$this->department = $department;
return $this;
}
public function getInseeCode(): ?int
{
return $this->inseeCode;
}
public function setInseeCode(?int $inseeCode): self
{
$this->inseeCode = $inseeCode;
return $this;
}
public function getSector1(): ?string
{
return $this->sector1;
}
public function setSector1(?string $sector1): self
{
$this->sector1 = $sector1;
return $this;
}
public function getSector2(): ?string
{
return $this->sector2;
}
public function setSector2(?string $sector2): self
{
$this->sector2 = $sector2;
return $this;
}
public function isHasDroughtAlert(): bool
{
return $this->hasDroughtAlert;
}
public function setHasDroughtAlert(bool $hasDroughtAlert): self
{
$this->hasDroughtAlert = $hasDroughtAlert;
return $this;
}
}