src/Entity/Materielphoto.php line 9
<?php
namespace App\Entity;
use App\Repository\MaterielphotoRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MaterielphotoRepository::class)]
class Materielphoto
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column]
private ?int $ordre = null;
#[ORM\ManyToOne(inversedBy: 'materielphotos')]
private ?Materiel $materiel = null;
#[ORM\ManyToOne]
private ?Image $image = null;
public function getId(): ?int
{
return $this->id;
}
public function getOrdre(): ?int
{
return $this->ordre;
}
public function setOrdre(int $ordre): self
{
$this->ordre = $ordre;
return $this;
}
public function getMateriel(): ?Materiel
{
return $this->materiel;
}
public function setMateriel(?Materiel $materiel): self
{
$this->materiel = $materiel;
return $this;
}
public function getImage(): ?Image
{
return $this->image;
}
public function setImage(?Image $image): self
{
$this->image = $image;
return $this;
}
public function __toString(): string
{
return $this->image->getUrlfichier();
}
}