<?php
namespace App\Entity;
use App\Repository\ImageCommentRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=ImageCommentRepository::class)
*/
class ImageComment
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Assert\File(
* maxSize = "400k",
* mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/tiff"},
* maxSizeMessage = "Le fichier est trop volumineux. Sa taille ne doit pas dépasser 2 MiB",
* mimeTypesMessage = "Only the filetypes image are allowed."
* )
*/
private $url;
/**
* @ORM\ManyToOne(targetEntity=Avis::class, inversedBy="imageComments")
*/
private $avis;
public function getId(): ?int
{
return $this->id;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(?string $url): self
{
$this->url = $url;
return $this;
}
public function getAvis(): ?Avis
{
return $this->avis;
}
public function setAvis(?Avis $avis): self
{
$this->avis = $avis;
return $this;
}
}