<?php
namespace App\Entity;
use App\Repository\ThemesRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ThemesRepository::class)]
#[ORM\Table(name: "themes")]
class Themes
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
// Relation ManyToOne vers Thematique
#[ORM\ManyToOne(targetEntity: Thematiques::class)]
#[ORM\JoinColumn(name: "thematique_id", referencedColumnName: "id", nullable: true)]
private ?Thematiques $thematique = null; // propriété côté Symfony (alias)
#[ORM\Column(length: 255)]
private string $nom;
#[ORM\Column(length: 255, nullable: true)]
private ?string $slug = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $description = null;
// Getters / Setters
public function getId(): ?int
{
return $this->id;
}
public function getThematique(): ?Thematiques
{
return $this->thematique;
}
public function setThematique(?Thematiques $thematique): self
{
$this->thematique = $thematique;
return $this;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
}