<?php
namespace App\Entity\Otpusk;
use App\Repository\Otpusk\CountryCharacteristicRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
/**
* @ORM\Entity(repositoryClass=CountryCharacteristicRepository::class)
*/
class CountryCharacteristic implements TranslatableInterface
{
use TranslatableTrait;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\Market", inversedBy="countryCharacteristics")
* @ORM\JoinColumn(name="market_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
private $market;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\Country", inversedBy="countryCharacteristics")
* @ORM\JoinColumn(name="country_id", referencedColumnName="rec_id", nullable=false, onDelete="CASCADE")
*/
private $country;
/**
* @var int|null
* @ORM\Column(type="string", length=6, nullable=true)
*/
private $flightTime;
public function setId($id): self
{
$this->id = $id;
return $this;
}
public function getId(): ?int
{
return $this->id;
}
public function getMarket(): ?Market
{
return $this->market;
}
public function setMarket(?Market $market): self
{
$this->market = $market;
return $this;
}
public function getCountry(): ?Country
{
return $this->country;
}
public function setCountry(?Country $country): self
{
$this->country = $country;
return $this;
}
public function getFlightTime(): ?string
{
return $this->flightTime;
}
public function setFlightTime(?string $flightTime): self
{
$this->flightTime = $flightTime;
return $this;
}
public function __toString()
{
return $this->getMarket()->getName().'-'.$this->getCountry()->getName();
}
}