src/Entity/GalleryGalleryTag.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Ramsey\Uuid\UuidInterface;
  5. use Ramsey\Uuid\Doctrine\UuidGenerator;
  6. /**
  7.  * @ORM\Entity()
  8.  * @ORM\Table(name="gallery_gallery_tag")
  9.  */
  10. class GalleryGalleryTag
  11. {
  12.     /**
  13.      * @var UuidInterface
  14.      *
  15.      * @ORM\Id()
  16.      * @ORM\Column(type="uuid", unique=true)
  17.      * @ORM\GeneratedValue(strategy="CUSTOM")
  18.      * @ORM\CustomIdGenerator(class=UuidGenerator::class)
  19.      */
  20.     private $uid;
  21.     /**
  22.      * @var GalleryTag
  23.      *
  24.      * @ORM\ManyToOne(targetEntity=GalleryTag::class, inversedBy="galleries")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private GalleryTag $tag;
  28.     /**
  29.      * @var Gallery
  30.      *
  31.      * @ORM\ManyToOne(targetEntity=Gallery::class, inversedBy="tags")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private Gallery $gallery;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column
  39.      */
  40.     private int $position;
  41.     public function __toString()
  42.     {
  43.         return $this->tag;
  44.     }
  45.     public function getGallery(): Gallery
  46.     {
  47.         return $this->gallery;
  48.     }
  49.     public function setGallery(Gallery $gallery): GalleryGalleryTag
  50.     {
  51.         $this->gallery $gallery;
  52.         return $this;
  53.     }
  54.     public function getId(): int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function setId(int $id): GalleryGalleryTag
  59.     {
  60.         $this->id $id;
  61.         return $this;
  62.     }
  63.     public function getPosition(): int
  64.     {
  65.         return $this->position;
  66.     }
  67.     public function setPosition(int $position): GalleryGalleryTag
  68.     {
  69.         $this->position $position;
  70.         return $this;
  71.     }
  72.     public function getTag(): GalleryTag
  73.     {
  74.         return $this->tag;
  75.     }
  76.     public function setTag(GalleryTag $tag): GalleryGalleryTag
  77.     {
  78.         $this->tag $tag;
  79.         return $this;
  80.     }
  81. }