src/Entity/NewsGalerie.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsGalerieRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use App\Entity\Traits\Timestampable;
  8. #[ORM\HasLifecycleCallbacks]
  9. #[ORM\Entity(repositoryClassNewsGalerieRepository::class)]
  10. class NewsGalerie
  11. {
  12.     use Timestampable;
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     #[Groups(['getNews'])]
  17.     private ?int $id null;
  18.     #[ORM\Column(length255)]
  19.     #[Groups(['getNews'])]
  20.     private ?string $imageName null;
  21.     #[ORM\ManyToOne(inversedBy'newsGaleries')]
  22.     private ?News $news null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getImageName(): ?string
  28.     {
  29.         return $this->imageName;
  30.     }
  31.     public function setImageName(string $imageName): static
  32.     {
  33.         $this->imageName $imageName;
  34.         return $this;
  35.     }
  36.     public function getNews(): ?News
  37.     {
  38.         return $this->news;
  39.     }
  40.     public function setNews(?News $news): static
  41.     {
  42.         $this->news $news;
  43.         return $this;
  44.     }
  45. }