src/Entity/AlbumImage.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AlbumImageRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAlbumImageRepository::class)]
  7. class AlbumImage
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $imageUrl null;
  15.     #[ORM\ManyToOne(inversedBy'albumImages')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Album $albumId null;
  18.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  19.     private ?string $alt null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getImageUrl(): ?string
  25.     {
  26.         return $this->imageUrl;
  27.     }
  28.     public function setImageUrl(string $imageUrl): self
  29.     {
  30.         $this->imageUrl $imageUrl;
  31.         return $this;
  32.     }
  33.     public function getAlbumId(): ?Album
  34.     {
  35.         return $this->albumId;
  36.     }
  37.     public function setAlbumId(?Album $albumId): self
  38.     {
  39.         $this->albumId $albumId;
  40.         return $this;
  41.     }
  42.     public function __toString()
  43.     {
  44.         return $this->imageUrl;
  45.     }
  46.     public function getAlt(): ?string
  47.     {
  48.         return $this->alt;
  49.     }
  50.     public function setAlt(?string $alt): self
  51.     {
  52.         $this->alt $alt;
  53.         return $this;
  54.     }
  55. }