From 5546eeb25efd7be720de35f855f4caaabc519131 Mon Sep 17 00:00:00 2001 From: Kouril42 Date: Tue, 14 Feb 2023 01:51:33 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20name=20=C3=A0=20Floor,=20Building?= =?UTF-8?q?=20et=20Site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entity/Building.php | 8 ++++++++ src/Entity/Floor.php | 11 +++++++++++ src/Entity/Site.php | 15 +++++++++++---- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/Entity/Building.php b/src/Entity/Building.php index 942ef29..18082e5 100644 --- a/src/Entity/Building.php +++ b/src/Entity/Building.php @@ -35,6 +35,14 @@ class Building return $this->id; } + public function getName(): string + { return $this->id; + } + public function setName(string $name): self + { $this->name = $name; + return $this; + } + public function getSite(): ?Site { return $this->site; diff --git a/src/Entity/Floor.php b/src/Entity/Floor.php index 65d03aa..9474ef0 100644 --- a/src/Entity/Floor.php +++ b/src/Entity/Floor.php @@ -14,6 +14,9 @@ class Floor #[ORM\GeneratedValue] #[ORM\Column(type: "integer")] private $id; + + #[ORM\Column(type: "string")] + private $name; #[ORM\Column(type: "integer")] private $altitude; @@ -35,6 +38,14 @@ class Floor return $this->id; } + public function getName(): string + { return $this->id; + } + public function setName(string $name): self + { $this->name = $name; + return $this; + } + public function getBuilding(): ?Building { return $this->building; diff --git a/src/Entity/Site.php b/src/Entity/Site.php index 38b5627..2faa798 100644 --- a/src/Entity/Site.php +++ b/src/Entity/Site.php @@ -15,8 +15,8 @@ class Site #[ORM\Column(type: "integer")] private $id; -// #[ORM\Column(type: "string")] -// private $name; + #[ORM\Column(type: "string")] + private $name; #[ORM\Column(type: "float")] private $zeroLatitude; @@ -33,8 +33,15 @@ class Site } public function getId(): ?int - { - return $this->id; + { return $this->id; + } + + public function getName(): string + { return $this->id; + } + public function setName(string $name): self + { $this->name = $name; + return $this; } public function getZeroLatitude(): ?float