Newer
Older
<?php
namespace App\Entity;
use App\Enum\Secteur;
use App\Repository\EtablissementRepository;

G. Daryl M. OKOU
a validé
use DateTimeInterface;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

G. Daryl M. OKOU
a validé
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: EtablissementRepository::class)]
class Etablissement
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir un nom d\'établissement.')]
#[ORM\Column(type: "string", length: 255, nullable: true)]
private ?string $nom = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une nature d\'établissement.')]
#[ORM\Column(type: "string", length: 255, nullable: true)]
private ?string $nature = null;
#[Assert\NotNull(message: 'Le rôle est requis.')]
#[Assert\Type(type: Secteur::class, message: 'Le rôle doit être une instance de Secteur.')]
#[ORM\Column(enumType: Secteur::class)]
private ?Secteur $secteur = null;

G. Daryl M. OKOU
a validé
#[Assert\Range(
notInRangeMessage: "La longitude doit être comprise entre -180 et 180.",
min: -180,
max: 180,
)]
#[ORM\Column(type: Types::DECIMAL, precision: 12, scale: 9, nullable: true)]
private ?string $longitude = null;

G. Daryl M. OKOU
a validé
#[Assert\Range(
notInRangeMessage: "La latitude doit être comprise entre -90 et 90.",
min: -90,
max: 90,
)]
#[ORM\Column(type: Types::DECIMAL, precision: 12, scale: 9, nullable: true)]
private ?string $latitude = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une adresse.')]
#[ORM\Column(length: 255, nullable: true)]
private ?string $adresse = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir un département.')]
#[ORM\Column(length: 255, nullable: true)]
private ?string $departement = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une région.')]
#[ORM\Column(length: 255, nullable: true)]
private ?string $region = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une académie.')]
#[ORM\Column(length: 255, nullable: true)]
private ?string $academie = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une commune.')]
#[ORM\Column(length: 255, nullable: true)]
private ?string $commune = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]

G. Daryl M. OKOU
a validé
private ?DateTimeInterface $date_ouverture = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir un code département.')]
Mathéo Beaudouin
a validé
#[ORM\Column(length: 255)]
private ?string $code_departement = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir un code académie.')]
Mathéo Beaudouin
a validé
#[ORM\Column(length: 255)]
private ?string $code_academie = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir un code région.')]
Mathéo Beaudouin
a validé
#[ORM\Column(length: 255)]
private ?string $code_region = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir un code commune.')]
Mathéo Beaudouin
a validé
#[ORM\Column(length: 255)]
private ?string $code_commune = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une coordonnée X.')]
#[ORM\Column(nullable: true)]
private ?float $coordX = null;

G. Daryl M. OKOU
a validé
#[Assert\NotBlank(message: 'Veuillez saisir une coordonnée Y.')]
#[ORM\Column(nullable: true)]
private ?float $coordY = null;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): static
{
$this->nom = $nom;
return $this;
}
public function getNature(): ?string
{
return $this->nature;
}
public function setNature(?string $nature): static
{
$this->nature = $nature;
return $this;
}
public function getSecteur(): ?Secteur
{
return $this->secteur;
}
public function setSecteur(Secteur $secteur): static
{
$this->secteur = $secteur;
return $this;
}
public function getLongitude(): ?string
{
return $this->longitude;
}
public function setLongitude(?string $longitude): static
{
$this->longitude = $longitude;
return $this;
}
public function getLatitude(): ?string
{
return $this->latitude;
}
public function setLatitude(?string $latitude): static
{
$this->latitude = $latitude;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): static
{
$this->adresse = $adresse;
return $this;
}
public function getDepartement(): ?string
{
return $this->departement;
}
public function setDepartement(?string $departement): static
{
$this->departement = $departement;
return $this;
}
public function getRegion(): ?string
{
return $this->region;
}
public function setRegion(?string $region): static
{
$this->region = $region;
return $this;
}
public function getAcademie(): ?string
{
return $this->academie;
}
public function setAcademie(?string $academie): static
{
$this->academie = $academie;
return $this;
}
public function getCommune(): ?string
{
return $this->commune;
}
public function setCommune(?string $commune): static
{
$this->commune = $commune;
return $this;
}

G. Daryl M. OKOU
a validé
public function getDateOuverture(): ?DateTimeInterface
{
return $this->date_ouverture;
}

G. Daryl M. OKOU
a validé
public function setDateOuverture(?DateTimeInterface $date_ouverture): static
{
$this->date_ouverture = $date_ouverture;
return $this;
}
Mathéo Beaudouin
a validé
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
public function getCodeDepartement(): ?string
{
return $this->code_departement;
}
public function setCodeDepartement(string $code_departement): static
{
$this->code_departement = $code_departement;
return $this;
}
public function getCodeAcademie(): ?string
{
return $this->code_academie;
}
public function setCodeAcademie(string $code_academie): static
{
$this->code_academie = $code_academie;
return $this;
}
public function getCodeRegion(): ?string
{
return $this->code_region;
}
public function setCodeRegion(string $code_region): static
{
$this->code_region = $code_region;
return $this;
}
public function getCodeCommune(): ?string
{
return $this->code_commune;
}
public function setCodeCommune(string $code_commune): static
{
$this->code_commune = $code_commune;
return $this;
}
public function getCoordX(): ?float
{
return $this->coordX;
}
public function setCoordX(?float $coordX): static
{
$this->coordX = $coordX;
return $this;
}
public function getCoordY(): ?float
{
return $this->coordY;
}
public function setCoordY(?float $coordY): static
{
$this->coordY = $coordY;
return $this;
}