<?php
namespace App\Entity;
use App\Repository\ImageRepository;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
use Symfony\Component\Uid\Uuid;
/**
* @ORM\Entity(repositoryClass=ImageRepository::class)
*/
class Image
{
/**
* @ORM\Id
* @ORM\Column(type="uuid", unique=true)
*/
private string $id;
/**
* @ORM\Column(type="string", length=255)
*/
private string $filename = '';
/**
* @ORM\Column(type="string", length=127)
*/
private string $mime = '';
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $caption = '';
public function __construct()
{
$this->id = Uuid::v4();
}
public function getId(): string
{
return $this->id;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename): self
{
$this->filename = $filename;
return $this;
}
public function getMime(): ?string
{
return $this->mime;
}
public function setMime(string $mime): self
{
$this->mime = $mime;
return $this;
}
public function getCaption(): ?string
{
return $this->caption;
}
public function setCaption(?string $caption): self
{
$this->caption = $caption;
return $this;
}
}