src/Entity/Image.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\ImageRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassImageRepository::class)]
  8. #[ApiResource]
  9. class Image
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $path null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $createdAt null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $description null;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getPath(): ?string
  26.     {
  27.         return $this->path;
  28.     }
  29.     public function setPath(?string $path): self
  30.     {
  31.         $this->path $path;
  32.         return $this;
  33.     }
  34.     public function getCreatedAt(): ?\DateTimeInterface
  35.     {
  36.         return $this->createdAt;
  37.     }
  38.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  39.     {
  40.         $this->createdAt $createdAt;
  41.         return $this;
  42.     }
  43.     public function getDescription(): ?string
  44.     {
  45.         return $this->description;
  46.     }
  47.     public function setDescription(?string $description): self
  48.     {
  49.         $this->description $description;
  50.         return $this;
  51.     }
  52. }