Ajout des scripts pour mettre les données dans la BDD, correction des attributs Doctrine (certains, pas tous)

This commit is contained in:
2023-02-06 17:54:20 +01:00
parent 29cda25a69
commit 23acce12ef
7 changed files with 262 additions and 91 deletions
+8 -9
View File
@@ -19,7 +19,6 @@ class Place
#[ORM\Column(type: "integer")]
private $id;
#[ORM\Type]
#[ORM\Column(type: "string")]
// Either 'C'orridor , 'S'tairs , 'E'levator or 'R'oom
private $type;
@@ -132,7 +131,7 @@ class Place
return $this->floors;
}
public function addFloor(self $floor): self
public function addFloor(Floor $floor): self
{
if (!$this->floors->contains($floor)) {
$this->floors[] = $floor;
@@ -140,7 +139,7 @@ class Place
return $this;
}
public function removeFloor(self $floor): self
public function removeFloor(Floor $floor): self
{
$this->floors->removeElement($floor);
return $this;
@@ -264,7 +263,7 @@ class Place
{
if (!$this->CylinderRepresentation->contains($cylinderRepresentation)) {
$this->CylinderRepresentation[] = $cylinderRepresentation;
$cylinderRepresentation->setRoom($this);
$cylinderRepresentation->setPlace($this);
}
return $this;
@@ -274,8 +273,8 @@ class Place
{
if ($this->CylinderRepresentation->removeElement($cylinderRepresentation)) {
// set the owning side to null (unless already changed)
if ($cylinderRepresentation->getRoom() === $this) {
$cylinderRepresentation->setRoom(null);
if ($cylinderRepresentation->getPlace() === $this) {
$cylinderRepresentation->setPlace(null);
}
}
@@ -295,7 +294,7 @@ class Place
{
if (!$this->PolySurfaceRepresentation->contains($polySurfaceRepresentation)) {
$this->PolySurfaceRepresentation[] = $polySurfaceRepresentation;
$polySurfaceRepresentation->setRoom($this);
$polySurfaceRepresentation->setPlace($this);
}
return $this;
@@ -305,8 +304,8 @@ class Place
{
if ($this->PolySurfaceRepresentation->removeElement($polySurfaceRepresentation)) {
// set the owning side to null (unless already changed)
if ($polySurfaceRepresentation->getRoom() === $this) {
$polySurfaceRepresentation->setRoom(null);
if ($polySurfaceRepresentation->getPlace() === $this) {
$polySurfaceRepresentation->setPlace(null);
}
}