<?php
namespace App\Entity;
use App\Repository\NewsGalerieRepository;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use App\Entity\Traits\Timestampable;
#[ORM\HasLifecycleCallbacks]
#[ORM\Entity(repositoryClass: NewsGalerieRepository::class)]
class NewsGalerie
{
use Timestampable;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Groups(['getNews'])]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[Groups(['getNews'])]
private ?string $imageName = null;
#[ORM\ManyToOne(inversedBy: 'newsGaleries')]
private ?News $news = null;
public function getId(): ?int
{
return $this->id;
}
public function getImageName(): ?string
{
return $this->imageName;
}
public function setImageName(string $imageName): static
{
$this->imageName = $imageName;
return $this;
}
public function getNews(): ?News
{
return $this->news;
}
public function setNews(?News $news): static
{
$this->news = $news;
return $this;
}
}