src/Entity/UseCaseTranslation.php line 12
<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\UseCaseTranslationRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UseCaseTranslationRepository::class)]
class UseCaseTranslation
{
#[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::STRING, length: 255, nullable: true)]
private ?string $titleMobile = null;
#[ORM\Column(type: Types::TEXT, nullable: false)]
private string $description;
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
private array $tags;
public function __construct(
#[ORM\ManyToOne(targetEntity: UseCase::class, inversedBy: 'translations')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private readonly UseCase $useCase,
#[ORM\Column(type: Types::STRING, length: 5, nullable: false)]
private readonly string $locale,
) {
}
public function getId(): ?int
{
return $this->id;
}
public function getUseCase(): UseCase
{
return $this->useCase;
}
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 getTitleMobile(): ?string
{
return $this->titleMobile;
}
public function setTitleMobile(string $title): void
{
$this->titleMobile = $title;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): void
{
$this->description = $description;
}
public function getTags(): array
{
return $this->tags;
}
public function setTags(array $tags): void
{
$this->tags = $tags;
}
}