<?php
namespace App\Entity;
use App\Repository\FooterSitesRepository;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: FooterSitesRepository::class)]
class FooterSites
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $nom= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $url= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $fichier_name= null;
/**
* @Vich\UploadableField(mapping="images", fileNameProperty="fichier_name")
*/
private ?File $image = null;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $ordre_lenord;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $ordre_services;
#[ORM\Column(type: 'datetime', nullable: true)]
private mixed $date_update;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $ordre_info;
public function setImage(File $file = null): void
{
$this->image = $file;
if ($file) {
$this->date_update = new \DateTime;
}
}
public function getImage(): mixed
{
return $this->image;
}
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 getUrl(): ?string
{
return $this->url;
}
public function setUrl(?string $url): self
{
$this->url = $url;
return $this;
}
public function getFichierName(): ?string
{
return $this->fichier_name;
}
public function setFichierName(?string $fichier_name): self
{
$this->fichier_name = $fichier_name;
return $this;
}
public function getOrdreLenord(): ?int
{
return $this->ordre_lenord;
}
public function setOrdreLenord(?int $ordre_lenord): self
{
$this->ordre_lenord = $ordre_lenord;
return $this;
}
public function getOrdreServices(): ?int
{
return $this->ordre_services;
}
public function setOrdreServices(?int $ordre_services): self
{
$this->ordre_services = $ordre_services;
return $this;
}
public function getDateUpdate(): ?DateTimeInterface
{
return $this->date_update;
}
public function setDateUpdate(?DateTimeInterface $date_update): self
{
$this->date_update = $date_update;
return $this;
}
public function getOrdreInfo(): ?int
{
return $this->ordre_info;
}
public function setOrdreInfo(?int $ordre_info): self
{
$this->ordre_info = $ordre_info;
return $this;
}
}