src/Entity/UseCaseTopicTranslation.php line 12

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use App\Repository\UseCaseTopicTranslationRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassUseCaseTopicTranslationRepository::class)]
  8. class UseCaseTopicTranslation
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(typeTypes::INTEGER)]
  13.     private ?int $id null;
  14.     #[ORM\Column(typeTypes::STRINGlength255nullabletrue)]
  15.     private ?string $title null;
  16.     #[ORM\Column(typeTypes::TEXTnullablefalse)]
  17.     private string $description;
  18.     public function __construct(
  19.         #[ORM\ManyToOne(targetEntityUseCaseTopic::class, inversedBy'translations')]
  20.         #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  21.         private readonly UseCaseTopic $useCaseTopic,
  22.         #[ORM\Column(typeTypes::STRINGlength5nullablefalse)]
  23.         private readonly string $locale,
  24.     )
  25.     { }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getUseCaseTopic(): UseCaseTopic
  31.     {
  32.         return $this->useCaseTopic;
  33.     }
  34.     public function getLocale(): string
  35.     {
  36.         return $this->locale;
  37.     }
  38.     public function getTitle(): ?string
  39.     {
  40.         return $this->title;
  41.     }
  42.     public function setTitle(string $title): void
  43.     {
  44.         $this->title $title;
  45.     }
  46.     public function getDescription(): ?string
  47.     {
  48.         return $this->description;
  49.     }
  50.     public function setDescription(string $description): void
  51.     {
  52.         $this->description $description;
  53.     }
  54. }