src/Entity/Image.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ImageRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassImageRepository::class)]
  6. class Image
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255nullabletrue)]
  13.     private $path;
  14.     #[ORM\ManyToOne(targetEntityGallery::class, inversedBy'images')]
  15.     private $gallery;
  16.     public function getId(): ?int
  17.     {
  18.         return $this->id;
  19.     }
  20.     public function getPath(): ?string
  21.     {
  22.         return $this->path;
  23.     }
  24.     public function setPath(?string $path): self
  25.     {
  26.         $this->path $path;
  27.         return $this;
  28.     }
  29.     public function getGallery(): ?Gallery
  30.     {
  31.         return $this->gallery;
  32.     }
  33.     public function setGallery(?Gallery $gallery): self
  34.     {
  35.         $this->gallery $gallery;
  36.         return $this;
  37.     }
  38. }