<?phpnamespace App\Entity;use App\Repository\RegionRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: RegionRepository::class)]class Region{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private ?int $id; #[ORM\Column(type: 'string', length: 255)] private ?string $name; #[ORM\Column(type: 'string', length: 255)] private ?string $establishment; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $email; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $phone; #[ORM\ManyToOne(targetEntity: AddressRegion::class, inversedBy: 'regions')] private ?AddressRegion $addressRegion; public function getCode(): ?int { return $this->getAddressRegion()->getCode(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getEstablishment(): ?string { return $this->establishment; } public function setEstablishment(string $establishment): self { $this->establishment = $establishment; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(?string $email): self { $this->email = $email; return $this; } public function getPhone(): ?string { return $this->phone; } public function setPhone(?string $phone): self { $this->phone = $phone; return $this; } public function getAddressRegion(): ?AddressRegion { return $this->addressRegion; } public function setAddressRegion(?AddressRegion $addressRegion): self { $this->addressRegion = $addressRegion; return $this; }}