<?phpnamespace App\Entity\Cvs;use Symfony\Component\Validator\Constraints as Assert;use Doctrine\ORM\Mapping as ORM;/** * Filtres pour la sidebar et les pages landing SEO côté ENTREPRISES. * Un tag polymorphe (peut représenter une ville ou un secteur) avec slug * pour générer une page dédiée /companies/{slug}. * * Pendant côté entreprises de JobsFilters : permet d'avoir des short_title/ * short_description orientés "entreprises" plutôt qu'"offres d'emploi" * pour un meilleur SEO sur le scope companies. * * @ORM\Table("cvs_enterprisesfilters") * @ORM\Entity(repositoryClass="App\Repository\Cvs\EnterprisesFiltersRepository") * @ORM\HasLifecycleCallbacks() */class EnterprisesFilters{ /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var \DateTimeInterface * * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"}) */ private $createdAt; /** * @var \DateTimeInterface * * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"}) */ private $updatedAt; /** * Slug pour l'URL (ex: "paris", "restauration", "agence-web"). * * @var string * * @ORM\Column(name="slug", type="string", length=255, nullable=true) * @Assert\NotBlank() */ private $slug; /** * Label affiché dans la sidebar (ex: "Paris", "Restauration"). * * @var string * * @ORM\Column(name="label", type="string", length=255, nullable=true) * @Assert\NotBlank() */ private $label; /** * Titre court pour SEO sur la page /companies/{slug} * (ex: "Entreprises qui recrutent à Paris", "Agences web qui recrutent"). * * @var string * * @ORM\Column(name="short_title", type="string", length=255, nullable=true) */ private $shortTitle; /** * Description courte pour SEO sur la page /companies/{slug}. * * @var string * * @ORM\Column(name="short_description", type="text", nullable=true) */ private $shortDescription; /** * Mot-clé utilisé pour filtrer dans la table Enterprises (matche city/category). * Peut différer du label : label "Resto" / searchKeyword "restauration". * * @var string * * @ORM\Column(name="search_keyword", type="string", length=255, nullable=true) */ private $searchKeyword; /** * Icône/emoji facultative (ex: "📍" pour ville, "🏢" pour secteur). * * @var string * * @ORM\Column(name="icon", type="string", length=50, nullable=true) */ private $icon; /** * Locale (fr, en). * * @var string * * @ORM\Column(name="locale", type="string", length=11, nullable=true) */ private $locale; /** * Type indicatif (city, category, custom). Pas obligatoire — purement informatif * pour l'admin. Le comportement est polymorphe (tag générique). * * @var string * * @ORM\Column(name="type", type="string", length=50, nullable=true) */ private $type; /** * Ordre d'affichage dans la sidebar. * * @var integer * * @ORM\Column(name="position", type="integer", nullable=true, options={"default":0}) */ private $position = 0; /** * Activé ou non. * * @var boolean * * @ORM\Column(name="online", type="boolean", nullable=true, options={"default":true}) */ private $online = true; public function __construct() {} /** * @ORM\PrePersist */ public function setCreatedAtValue(): void { $this->setCreatedAt(new \DateTime("now")); $this->setUpdatedAt(new \DateTime("now")); } /** * @ORM\PreUpdate */ public function setUpdatedAtValue(): void { $this->setUpdatedAt(new \DateTime("now")); } public function __toString() { return $this->label ?? (string) $this->id; } public function getId(): ?int { return $this->id; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(?\DateTimeInterface $v): static { $this->createdAt = $v; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeInterface $v): static { $this->updatedAt = $v; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(?string $v): static { $this->slug = $v; return $this; } public function getLabel(): ?string { return $this->label; } public function setLabel(?string $v): static { $this->label = $v; return $this; } public function getShortTitle(): ?string { return $this->shortTitle; } public function setShortTitle(?string $v): static { $this->shortTitle = $v; return $this; } public function getShortDescription(): ?string { return $this->shortDescription; } public function setShortDescription(?string $v): static { $this->shortDescription = $v; return $this; } public function getSearchKeyword(): ?string { return $this->searchKeyword; } public function setSearchKeyword(?string $v): static { $this->searchKeyword = $v; return $this; } public function getIcon(): ?string { return $this->icon; } public function setIcon(?string $v): static { $this->icon = $v; return $this; } public function getLocale(): ?string { return $this->locale; } public function setLocale(?string $v): static { $this->locale = $v; return $this; } public function getType(): ?string { return $this->type; } public function setType(?string $v): static { $this->type = $v; return $this; } public function getPosition(): ?int { return $this->position; } public function setPosition(?int $v): static { $this->position = $v; return $this; } public function getOnline(): ?bool { return $this->online; } public function setOnline(?bool $v): static { $this->online = $v; return $this; }}