src/Entity/Region.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RegionRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassRegionRepository::class)]
  7. class Region
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(typeTypes::TEXT)]
  14.     private ?string $titre null;
  15.     #[ORM\ManyToOne]
  16.     private ?Pays $pays null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $dateCreation null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  20.     private ?\DateTimeInterface $dateUpdate null;
  21.     #[ORM\OneToMany(targetEntityDepartement::class, mappedBy'region'cascade: ['remove'])]
  22.     private $children;
  23.     #[ORM\Column]
  24.     private ?int $etat null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getTitre(): ?string
  30.     {
  31.         return $this->titre;
  32.     }
  33.     public function setTitre(string $titre): static
  34.     {
  35.         $this->titre $titre;
  36.         return $this;
  37.     }
  38.     public function getPays(): ?Pays
  39.     {
  40.         return $this->pays;
  41.     }
  42.     public function setPays(?Pays $pays): static
  43.     {
  44.         $this->pays $pays;
  45.         return $this;
  46.     }
  47.     public function getDateCreation(): ?\DateTimeInterface
  48.     {
  49.         return $this->dateCreation;
  50.     }
  51.     public function setDateCreation(?\DateTimeInterface $dateCreation): static
  52.     {
  53.         $this->dateCreation $dateCreation;
  54.         return $this;
  55.     }
  56.     public function getDateUpdate(): ?\DateTimeInterface
  57.     {
  58.         return $this->dateUpdate;
  59.     }
  60.     public function setDateUpdate(?\DateTimeInterface $dateUpdate): static
  61.     {
  62.         $this->dateUpdate $dateUpdate;
  63.         return $this;
  64.     }
  65.     public function getEtat(): ?int
  66.     {
  67.         return $this->etat;
  68.     }
  69.     public function setEtat(int $etat): static
  70.     {
  71.         $this->etat $etat;
  72.         return $this;
  73.     }
  74.   
  75. }