src/Entity/Image.php line 9

Open in your IDE?
  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]
  11.     private ?int $id null;
  12.     #[ORM\Column(length255)]
  13.     private ?string $fileName null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $imageUrl null;
  16.     #[ORM\ManyToOne(inversedBy'images')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Produit $produit null;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getFileName(): ?string
  24.     {
  25.         return $this->fileName;
  26.     }
  27.     public function setFileName(string $fileName): self
  28.     {
  29.         $this->fileName $fileName;
  30.         return $this;
  31.     }
  32.     public function getImageUrl(): ?string
  33.     {
  34.         return $this->imageUrl;
  35.     }
  36.     public function setImageUrl(string $imageUrl): self
  37.     {
  38.         $this->imageUrl $imageUrl;
  39.         return $this;
  40.     }
  41.     public function getProduit(): ?Produit
  42.     {
  43.         return $this->produit;
  44.     }
  45.     public function setProduit(?Produit $produit): self
  46.     {
  47.         $this->produit $produit;
  48.         return $this;
  49.     }
  50. }