mirror of
https://gitlab.aliens-lyon.fr/encartes/backend.git
synced 2026-09-12 01:00:47 +02:00
Mise à jour de symfony
Mise à jour de PHP Correction des entitées from attributes to annotations Ajout des entitées des objets 3D
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\PolySurfaceRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: PolySurfaceRepository::class)]
|
||||
class PolySurface
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: "integer")]
|
||||
private $id;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: PlaneSurface::class, mappedBy: "polySurface")]
|
||||
private $polysurfaceComponent;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Corridor::class)]
|
||||
private $SurfaceRepresentation;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->polysurfaceComponent = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, PlaneSurface>
|
||||
*/
|
||||
public function getPolysurfaceComponent(): Collection
|
||||
{
|
||||
return $this->polysurfaceComponent;
|
||||
}
|
||||
|
||||
public function addPolysurfaceComponent(PlaneSurface $polysurfaceComponent): self
|
||||
{
|
||||
if (!$this->polysurfaceComponent->contains($polysurfaceComponent)) {
|
||||
$this->polysurfaceComponent[] = $polysurfaceComponent;
|
||||
$polysurfaceComponent->setPolySurface($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removePolysurfaceComponent(PlaneSurface $polysurfaceComponent): self
|
||||
{
|
||||
if ($this->polysurfaceComponent->removeElement($polysurfaceComponent)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($polysurfaceComponent->getPolySurface() === $this) {
|
||||
$polysurfaceComponent->setPolySurface(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSurfaceRepresentation(): ?Corridor
|
||||
{
|
||||
return $this->SurfaceRepresentation;
|
||||
}
|
||||
|
||||
public function setSurfaceRepresentation(?Corridor $SurfaceRepresentation): self
|
||||
{
|
||||
$this->SurfaceRepresentation = $SurfaceRepresentation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user