src/Entity/UseCaseTranslation.php line 12

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use App\Repository\UseCaseTranslationRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassUseCaseTranslationRepository::class)]
  8. class UseCaseTranslation
  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::STRINGlength255nullabletrue)]
  17.     private ?string $titleMobile null;
  18.     #[ORM\Column(typeTypes::TEXTnullablefalse)]
  19.     private string $description;
  20.     public function __construct(
  21.         #[ORM\ManyToOne(targetEntityUseCase::class, inversedBy'translations')]
  22.         #[ORM\JoinColumn(nullablefalseonDelete'CASCADE')]
  23.         private readonly UseCase $useCase,
  24.         #[ORM\Column(typeTypes::STRINGlength5nullablefalse)]
  25.         private readonly string $locale,
  26.     ) {
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getUseCase(): UseCase
  33.     {
  34.         return $this->useCase;
  35.     }
  36.     public function getLocale(): string
  37.     {
  38.         return $this->locale;
  39.     }
  40.     public function getTitle(): ?string
  41.     {
  42.         return $this->title;
  43.     }
  44.     public function setTitle(string $title): void
  45.     {
  46.         $this->title $title;
  47.     }
  48.     public function getTitleMobile(): ?string
  49.     {
  50.         return $this->titleMobile;
  51.     }
  52.     public function setTitleMobile(string $title): void
  53.     {
  54.         $this->titleMobile $title;
  55.     }
  56.     public function getDescription(): ?string
  57.     {
  58.         return $this->description;
  59.     }
  60.     public function setDescription(string $description): void
  61.     {
  62.         $this->description $description;
  63.     }
  64. }