<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\DeleteTrait;
use App\Entity\Traits\SortOrderTrait;
use App\Entity\Traits\TranslateTrait;
use Gedmo\Mapping\Annotation as Gedmo;
use App\Entity\Traits\ImageUploadTrait;
use App\Entity\Interfaces\DefaultEntity;
use App\Entity\Traits\FileUploadTrait;
use App\Repository\GalleryImageRepository;
use App\Entity\Traits\TitleAndContentTrait;
use Gedmo\Timestampable\Traits\TimestampableEntity;
/**
* @Gedmo\Loggable
*/
#[ORM\Entity(repositoryClass: GalleryImageRepository::class)]
class GalleryImage implements DefaultEntity
{
use TitleAndContentTrait;
use ImageUploadTrait;
use FileUploadTrait;
use SortOrderTrait;
use ActiveTrait;
use DeleteTrait;
use TimestampableEntity;
use TranslateTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type:"integer")]
private $id;
#[ORM\ManyToOne(targetEntity: Gallery::class, inversedBy: 'galleryImages')]
#[ORM\JoinColumn(nullable: false)]
private $gallery;
public function getId(): ?int
{
return $this->id;
}
public function getGallery(): ?Gallery
{
return $this->gallery;
}
public function setGallery(?Gallery $gallery): self
{
$this->gallery = $gallery;
return $this;
}
}