src/Entity/Images.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ImagesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassImagesRepository::class)]
  6. class Images
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255)]
  13.     private $name;
  14.     #[ORM\ManyToOne(targetEntityProducts::class, inversedBy'images')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private $products;
  17.     public function getId(): ?int
  18.     {
  19.         return $this->id;
  20.     }
  21.     public function getName(): ?string
  22.     {
  23.         return $this->name;
  24.     }
  25.     public function setName(string $name): self
  26.     {
  27.         $this->name $name;
  28.         return $this;
  29.     }
  30.     public function getProducts(): ?Products
  31.     {
  32.         return $this->products;
  33.     }
  34.     public function setProducts(?Products $products): self
  35.     {
  36.         $this->products $products;
  37.         return $this;
  38.     }
  39. }