src/Entity/SucessStory.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SucessStoryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. #[ORM\Entity(repositoryClassSucessStoryRepository::class)]
  7. class SucessStory
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\Column(type'integer'uniquetrue)]
  11.     #[ORM\GeneratedValue(strategy'AUTO')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255nullabletrue)]
  14.     private $nom;
  15.     #[ORM\Column(type'text'nullabletrue)]
  16.     private $description;
  17.     #[ORM\Column(type'string'length:300nullabletrue)]
  18.     private $lien;
  19.     #[ORM\Column(type'date'nullabletrue)]
  20.     private $date;
  21.     #[ORM\Column(name'photo' ,type'string'length5000)]
  22.     #[Assert\File(maxSize'5000k'mimeTypes:['image/jpeg''image/jpg''image/png''image/GIF'])]
  23.     protected $photo;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getNom(): ?string
  29.     {
  30.         return $this->nom;
  31.     }
  32.     public function setNom(?string $nom): self
  33.     {
  34.         $this->nom $nom;
  35.         return $this;
  36.     }
  37.     public function getDescription(): ?string
  38.     {
  39.         return $this->description;
  40.     }
  41.     public function setDescription(?string $description): self
  42.     {
  43.         $this->description $description;
  44.         return $this;
  45.     }
  46.     public function getLien(): ?string
  47.     {
  48.         return $this->lien;
  49.     }
  50.     public function setLien(?string $lien): self
  51.     {
  52.         $this->lien $lien;
  53.         return $this;
  54.     }
  55.     public function getDate(): ?\DateTimeInterface
  56.     {
  57.         return $this->date;
  58.     }
  59.     public function setDate(?\DateTimeInterface $date): self
  60.     {
  61.         $this->date $date;
  62.         return $this;
  63.     }
  64.     /**
  65.      * @return mixed
  66.      */
  67.     public function getPhoto()
  68.     {
  69.         return $this->photo;
  70.     }
  71.     /**
  72.      * @param mixed $photo
  73.      */
  74.     public function setPhoto($photo): void
  75.     {
  76.         $this->photo $photo;
  77.     }
  78. }