<?php
namespace App\Entity;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Doctrine\ORM\Mapping as ORM;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: \App\Repository\PagesLegalesRepository::class)]
class PagesLegales
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $filename = null;
/**
* @Vich\UploadableField(mapping="images", fileNameProperty="filename")
*/
private ?\Symfony\Component\HttpFoundation\File\File $file = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $titre= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $meta_titre= null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $meta_description= null;
#[ORM\Column(type: 'datetime', nullable: true)]
private mixed $date_updated;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $content= null;
#[ORM\Column(type: 'boolean', nullable: true)]
private ?bool $actif;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $slug= null;
public function getId(): ?int
{
return $this->id;
}
public function setFile(File $file = null): void
{
$this->file = $file;
if ($file) {
$this->date_updated = new \DateTime('now');
}
}
public function getFile(): mixed
{
return $this->file;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename = null): mixed
{
$this->filename = $filename;
return $this;
}
public function getTitre(): ?string
{
return $this->titre;
}
public function setTitre(?string $titre): self
{
$this->titre = $titre;
return $this;
}
public function getMetaTitre(): ?string
{
return $this->meta_titre;
}
public function setMetaTitre(?string $meta_titre): self
{
$this->meta_titre = $meta_titre;
return $this;
}
public function getMetaDescription(): ?string
{
return $this->meta_description;
}
public function setMetaDescription(?string $meta_description): self
{
$this->meta_description = $meta_description;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getActif(): ?bool
{
return $this->actif;
}
public function setActif(?bool $actif): self
{
$this->actif = $actif;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
}