src/Entity/Gallery.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\GalleryRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassGalleryRepository::class)]
  7. #[ApiResource]
  8. class Gallery
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(inversedBy'galleries')]
  15.     private ?Profile $profile null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $image null;
  18.   
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getProfile(): ?Profile
  24.     {
  25.         return $this->profile;
  26.     }
  27.     public function setProfile(?Profile $profile): self
  28.     {
  29.         $this->profile $profile;
  30.         return $this;
  31.     }
  32.     public function getImage(): ?string
  33.     {
  34.         return $this->image;
  35.     }
  36.     public function setImage(?string $image): self
  37.     {
  38.         $this->image $image;
  39.         return $this;
  40.     }
  41.     
  42. }