src/Entity/UseCaseTopicTranslation.php line 12
<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\UseCaseTopicTranslationRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UseCaseTopicTranslationRepository::class)]
class UseCaseTopicTranslation
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: Types::INTEGER)]
private ?int $id = null;
#[ORM\Column(type: Types::STRING, length: 255, nullable: true)]
private ?string $title = null;
#[ORM\Column(type: Types::TEXT, nullable: false)]
private string $description;
public function __construct(
#[ORM\ManyToOne(targetEntity: UseCaseTopic::class, inversedBy: 'translations')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private readonly UseCaseTopic $useCaseTopic,
#[ORM\Column(type: Types::STRING, length: 5, nullable: false)]
private readonly string $locale,
)
{ }
public function getId(): ?int
{
return $this->id;
}
public function getUseCaseTopic(): UseCaseTopic
{
return $this->useCaseTopic;
}
public function getLocale(): string
{
return $this->locale;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): void
{
$this->title = $title;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): void
{
$this->description = $description;
}
}