<?phpnamespace App\Entity;use Doctrine\ORM\Mapping\Index;use Doctrine\ORM\Mapping as ORM;use Gedmo\Translatable\Translatable;use App\Repository\CharvalRepository;use App\Entity\Translation\PageTranslation;use App\Entity\Translation\CharvalTranslation;use Gedmo\Mapping\Annotation\TranslationEntity;use Doctrine\Common\Collections\ArrayCollection;use Gedmo\Mapping\Annotation\Locale as GedmoLocale;use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;#[ORM\Entity(repositoryClass: CharvalRepository::class)]#[TranslationEntity(class: CharvalTranslation::class)]#[Index(name: "charval_char", columns: ["char"])]#[Index(name: "charval_visible", columns: ["visible"])]#[Index(name: "charval_prior", columns: ["prior"])]class Charval implements EntityInterface{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: 'integer')] private int $char = 0; #[GedmoTranslatable] #[ORM\Column(length: 255)] private ?string $value = null; #[ORM\Column] private ?bool $visible = null; #[ORM\Column] private ?int $prior = null; #[GedmoLocale] private $locale; #[ORM\OneToMany(targetEntity: CharvalTranslation::class, mappedBy: 'object', cascade: ['persist', 'remove'])] private $translations; public function __construct() { $this->translations = new ArrayCollection(); } public function setLocale($locale) { $this->locale = $locale; } public function getTranslations() { return $this->translations; } public function addTranslation(CharvalTranslation $t) { if (!$this->translations->contains($t)) { $this->translations[] = $t; $t->setObject($this); } } public function getId(): ?int { return $this->id; } public function getCharId(): ?int { return $this->char; } public function setCharId(int $char_id): self { $this->char = $char_id; return $this; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; } public function isVisible(): ?bool { return $this->visible; } public function setVisible(bool $visible): self { $this->visible = $visible; return $this; } public function getPrior(): ?int { return $this->prior; } public function setPrior(int $prior): self { $this->prior = $prior; return $this; }}