<?phpnamespace App\Entity;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping\Index;use Doctrine\ORM\Mapping as ORM;use App\Repository\CityRepository;use Gedmo\Translatable\Translatable;use App\Entity\Translation\CityTranslation;use App\Entity\Translation\PageTranslation;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: CityRepository::class)]#[TranslationEntity(class: CityTranslation::class)]#[Index(name: "city_fias_id", columns: ["fias_id"])]#[Index(name: "city_postal_code", columns: ["postal_code"])]class City implements EntityInterface{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: 'integer')] private ?int $region = 0; #[ORM\Column(length: 255)] private ?string $fias_id = ''; #[ORM\Column(length: 255)] private ?string $postal_code = ''; #[ORM\Column(length: 255)] private ?string $type = ''; #[GedmoTranslatable] #[ORM\Column(length: 255)] private ?string $name = ''; #[ORM\Column(length: 255)] private ?string $kw = ''; #[ORM\Column(type: Types::SMALLINT)] private ?int $prior = 0; #[ORM\Column] private ?bool $visible = true; #[ORM\Column] private ?bool $top = false; #[ORM\Column] private ?bool $top2 = false; #[GedmoLocale] private $locale; #[ORM\OneToMany(targetEntity: CityTranslation::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(CityTranslation $t) { if (!$this->translations->contains($t)) { $this->translations[] = $t; $t->setObject($this); } } public function getId(): ?int { return $this->id; } public function getRegion(): int { return $this->region; } public function setRegion(int $region): self { $this->region = $region; return $this; } public function getFiasId(): ?string { return $this->fias_id; } public function setFiasId(string $fias_id): self { $this->fias_id = $fias_id; return $this; } public function getPostalCode(): ?string { return $this->postal_code; } public function setPostalCode(string $postal_code): self { $this->postal_code = $postal_code; return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getKw(): ?string { return $this->kw; } public function setKw(string $kw): self { $this->kw = $kw; 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; } public function isTop(): ?bool { return $this->top; } public function setTop(bool $top): self { $this->top = $top; return $this; } public function isTop2(): ?bool { return $this->top2; } public function setTop2(bool $top2): self { $this->top2 = $top2; return $this; }}