src/Entity/Theme.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ThemeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. #[ORM\Entity(repositoryClassThemeRepository::class)]
  9. #[UniqueEntity('name')]
  10. class Theme
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[ORM\Column(type'string'length255uniquetrue)]
  17.     private $name;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private $description;
  20.     public function __toString(): string
  21.     {
  22.         return $this->name;
  23.     }
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getName(): ?string
  29.     {
  30.         return $this->name;
  31.     }
  32.     public function setName(string $name): self
  33.     {
  34.         $this->name $name;
  35.         return $this;
  36.     }
  37.     public function getDescription(): ?string
  38.     {
  39.         return $this->description;
  40.     }
  41.     public function setDescription(?string $description): self
  42.     {
  43.         $this->description $description;
  44.         return $this;
  45.     }
  46. }