Ajout des relations OtM et MtM

This commit is contained in:
2022-11-16 15:24:07 +01:00
parent 87c1d313fb
commit 3e9cae5270
4 changed files with 189 additions and 0 deletions
+18
View File
@@ -17,8 +17,26 @@ class Corridor
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Floor::class, inversedBy="corridors")
* @ORM\JoinColumn(nullable=false)
*/
private $floor;
public function getId(): ?int
{
return $this->id;
}
public function getFloor(): ?Floor
{
return $this->floor;
}
public function setFloor(?Floor $floor): self
{
$this->floor = $floor;
return $this;
}
}