<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\GalleryRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: GalleryRepository::class)]
#[ApiResource]
class Gallery
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(inversedBy: 'galleries')]
private ?Profile $profile = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $image = null;
public function getId(): ?int
{
return $this->id;
}
public function getProfile(): ?Profile
{
return $this->profile;
}
public function setProfile(?Profile $profile): self
{
$this->profile = $profile;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(?string $image): self
{
$this->image = $image;
return $this;
}
}