<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
/**
* @ORM\Entity()
* @ORM\Table(uniqueConstraints={@UniqueConstraint(columns={"location_id", "locale"})})
*/
class LocationTranslation implements LocationTranslationInterface
{
use ResourceTrait;
use TimestampableTrait;
use CreatedByAwareTrait;
use UpdatedByAwareTrait;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Location", inversedBy="locationTranslations")
* @ORM\JoinColumn(name="location_id", nullable=false)
*/
private ?LocationInterface $location = null;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private ?string $locale = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $headquarter = null;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $description = null;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private ?string $city = null;
public function __toString(): string
{
return sprintf('%s (%s)', $this->location, $this->locale);
}
public function getLocation(): ?LocationInterface
{
return $this->location;
}
public function setLocation(?LocationInterface $location): void
{
$this->location = $location;
}
public function getLocale(): ?string
{
return $this->locale;
}
public function setLocale(?string $locale): void
{
$this->locale = $locale;
}
public function getHeadquarter(): ?string
{
return $this->headquarter;
}
public function setHeadquarter(?string $headquarter): void
{
$this->headquarter = $headquarter;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): void
{
$this->description = $description;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): void
{
$this->city = $city;
}
}