src/Entity/Themes.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ThemesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassThemesRepository::class)]
  6. #[ORM\Table(name"themes")]
  7. class Themes
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     // Relation ManyToOne vers Thematique
  14.     #[ORM\ManyToOne(targetEntityThematiques::class)]
  15.     #[ORM\JoinColumn(name"thematique_id"referencedColumnName"id"nullabletrue)]
  16.     private ?Thematiques $thematique null// propriété côté Symfony (alias)
  17.     #[ORM\Column(length255)]
  18.     private string $nom;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $slug null;
  21.     #[ORM\Column(type'text'nullabletrue)]
  22.     private ?string $description null;
  23.     // Getters / Setters
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getThematique(): ?Thematiques
  29.     {
  30.         return $this->thematique;
  31.     }
  32.     public function setThematique(?Thematiques $thematique): self
  33.     {
  34.         $this->thematique $thematique;
  35.         return $this;
  36.     }
  37.     public function getNom(): ?string
  38.     {
  39.         return $this->nom;
  40.     }
  41.     public function setNom(string $nom): self
  42.     {
  43.         $this->nom $nom;
  44.         return $this;
  45.     }
  46.     public function getSlug(): ?string
  47.     {
  48.         return $this->slug;
  49.     }
  50.     public function setSlug(?string $slug): self
  51.     {
  52.         $this->slug $slug;
  53.         return $this;
  54.     }
  55.     public function getDescription(): ?string
  56.     {
  57.         return $this->description;
  58.     }
  59.     public function setDescription(?string $description): self
  60.     {
  61.         $this->description $description;
  62.         return $this;
  63.     }
  64. }