<?phpnamespace App\Entity;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use App\Repository\RegionRepository;use Doctrine\Common\Collections\Collection;use ApiPlatform\Core\Annotation\ApiResource;use App\Entity\Translation\RegionTranslation;use Doctrine\Common\Collections\ArrayCollection;use Gedmo\Mapping\Annotation\TranslationEntity;use Gedmo\Mapping\Annotation\Locale as GedmoLocale;use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;#[ORM\Entity(repositoryClass: RegionRepository::class)]#[TranslationEntity(class: RegionTranslation::class)]class Region implements EntityInterface{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $fias_id = null; #[GedmoTranslatable] #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\Column(type: Types::SMALLINT)] private ?int $prior = null; #[ORM\Column] private ?bool $visible = null; #[GedmoLocale] private $locale; #[ORM\OneToMany(targetEntity: RegionTranslation::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(RegionTranslation $t) { if (!$this->translations->contains($t)) { $this->translations[] = $t; $t->setObject($this); } } public function getId(): ?int { return $this->id; } public function getFiasId(): ?string { return $this->fias_id; } public function setFiasId(string $fias_id): self { $this->fias_id = $fias_id; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getPrior(): ?int { return $this->prior; } public function setPrior(int $prior): self { $this->prior = $prior; return $this; } public function isVisible(): ?bool { return $this->visible; } public function setVisible(bool $visible): self { $this->visible = $visible; return $this; }}