src/Entity/FooterSites.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FooterSitesRepository;
  4. use DateTimeInterface;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\HttpFoundation\File\File;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. /**
  9.  * @Vich\Uploadable
  10.  */
  11. #[ORM\Entity(repositoryClassFooterSitesRepository::class)]
  12. class FooterSites
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(type'integer')]
  17.     private int $id;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private ?string $nomnull;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private ?string $urlnull;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private ?string $fichier_namenull;
  24.     /**
  25.      * @Vich\UploadableField(mapping="images", fileNameProperty="fichier_name")
  26.      */
  27.     private ?File $image null;
  28.     #[ORM\Column(type'integer'nullabletrue)]
  29.     private ?int $ordre_lenord;
  30.     #[ORM\Column(type'integer'nullabletrue)]
  31.     private ?int $ordre_services;
  32.     #[ORM\Column(type'datetime'nullabletrue)]
  33.     private mixed $date_update;
  34.     #[ORM\Column(type'integer'nullabletrue)]
  35.     private ?int $ordre_info;
  36.     public function setImage(File $file null): void
  37.     {
  38.         $this->image $file;
  39.         if ($file) {
  40.             $this->date_update = new \DateTime;
  41.         }
  42.     }
  43.     public function getImage(): mixed
  44.     {
  45.         return $this->image;
  46.     }
  47.     public function getId(): ?int
  48.     {
  49.         return $this->id;
  50.     }
  51.     public function getNom(): ?string
  52.     {
  53.         return $this->nom;
  54.     }
  55.     public function setNom(?string $nom): self
  56.     {
  57.         $this->nom $nom;
  58.         return $this;
  59.     }
  60.     public function getUrl(): ?string
  61.     {
  62.         return $this->url;
  63.     }
  64.     public function setUrl(?string $url): self
  65.     {
  66.         $this->url $url;
  67.         return $this;
  68.     }
  69.     public function getFichierName(): ?string
  70.     {
  71.         return $this->fichier_name;
  72.     }
  73.     public function setFichierName(?string $fichier_name): self
  74.     {
  75.         $this->fichier_name $fichier_name;
  76.         return $this;
  77.     }
  78.     public function getOrdreLenord(): ?int
  79.     {
  80.         return $this->ordre_lenord;
  81.     }
  82.     public function setOrdreLenord(?int $ordre_lenord): self
  83.     {
  84.         $this->ordre_lenord $ordre_lenord;
  85.         return $this;
  86.     }
  87.     public function getOrdreServices(): ?int
  88.     {
  89.         return $this->ordre_services;
  90.     }
  91.     public function setOrdreServices(?int $ordre_services): self
  92.     {
  93.         $this->ordre_services $ordre_services;
  94.         return $this;
  95.     }
  96.     public function getDateUpdate(): ?DateTimeInterface
  97.     {
  98.         return $this->date_update;
  99.     }
  100.     public function setDateUpdate(?DateTimeInterface $date_update): self
  101.     {
  102.         $this->date_update $date_update;
  103.         return $this;
  104.     }
  105.     public function getOrdreInfo(): ?int
  106.     {
  107.         return $this->ordre_info;
  108.     }
  109.     public function setOrdreInfo(?int $ordre_info): self
  110.     {
  111.         $this->ordre_info $ordre_info;
  112.         return $this;
  113.     }
  114. }