src/Entity/WateringTips/Town.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\WateringTips;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\App\TownRepository")
  7.  * @ORM\Table(name="Town")
  8.  */
  9. class Town
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private ?int $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=false)
  19.      */
  20.     private ?string $name;
  21.     /**
  22.      * @ORM\Column(type="integer", nullable=true)
  23.      */
  24.     private ?int $department;
  25.     /**
  26.      * @ORM\Column(type="integer", nullable=true, unique=true)
  27.      */
  28.     private ?int $inseeCode;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private ?string $sector1;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private ?string $sector2;
  37.     /**
  38.      * @ORM\Column(type="boolean", nullable=false)
  39.      */
  40.     private bool $hasDroughtAlert false;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function setId(?int $id): self
  46.     {
  47.         $this->id $id;
  48.         return $this;
  49.     }
  50.     public function getName(): ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(?string $name): self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getDepartment(): ?int
  60.     {
  61.         return $this->department;
  62.     }
  63.     public function setDepartment(?int $department): self
  64.     {
  65.         $this->department $department;
  66.         return $this;
  67.     }
  68.     public function getInseeCode(): ?int
  69.     {
  70.         return $this->inseeCode;
  71.     }
  72.     public function setInseeCode(?int $inseeCode): self
  73.     {
  74.         $this->inseeCode $inseeCode;
  75.         return $this;
  76.     }
  77.     public function getSector1(): ?string
  78.     {
  79.         return $this->sector1;
  80.     }
  81.     public function setSector1(?string $sector1): self
  82.     {
  83.         $this->sector1 $sector1;
  84.         return $this;
  85.     }
  86.     public function getSector2(): ?string
  87.     {
  88.         return $this->sector2;
  89.     }
  90.     public function setSector2(?string $sector2): self
  91.     {
  92.         $this->sector2 $sector2;
  93.         return $this;
  94.     }
  95.     public function isHasDroughtAlert(): bool
  96.     {
  97.         return $this->hasDroughtAlert;
  98.     }
  99.     public function setHasDroughtAlert(bool $hasDroughtAlert): self
  100.     {
  101.         $this->hasDroughtAlert $hasDroughtAlert;
  102.         return $this;
  103.     }
  104. }