<?php
namespace App\Entity;
use App\Repository\SucessStoryRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: SucessStoryRepository::class)]
class SucessStory
{
#[ORM\Id]
#[ORM\Column(type: 'integer', unique: true)]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $nom;
#[ORM\Column(type: 'text', nullable: true)]
private $description;
#[ORM\Column(type: 'string', length:300, nullable: true)]
private $lien;
#[ORM\Column(type: 'date', nullable: true)]
private $date;
#[ORM\Column(name: 'photo' ,type: 'string', length: 5000)]
#[Assert\File(maxSize: '5000k', mimeTypes:['image/jpeg', 'image/jpg', 'image/png', 'image/GIF'])]
protected $photo;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getLien(): ?string
{
return $this->lien;
}
public function setLien(?string $lien): self
{
$this->lien = $lien;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
/**
* @return mixed
*/
public function getPhoto()
{
return $this->photo;
}
/**
* @param mixed $photo
*/
public function setPhoto($photo): void
{
$this->photo = $photo;
}
}