<?php
namespace App\Entity;
use App\Entity\Common\SoftDeletableEntityTrait;
use App\Entity\Common\StatefulEntityTrait;
use App\Entity\Common\TimestampedEntityTrait;
use Doctrine\ORM\Mapping\UniqueConstraint;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
/**
* Class LocationCountry
*
* @ORM\Entity(repositoryClass="App\Repository\LocationCountryRepository")
* @ORM\Table(indexes={
* @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
* @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
* @ORM\Index(name="IDX_is_active", columns={"is_active"})
* })
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
class LocationCountry
{
use SoftDeletableEntityTrait, StatefulEntityTrait, TimestampedEntityTrait;
/**
* @var string
*
* @ORM\Id()
* @ORM\Column(length=6)
*/
private $code;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $name;
/**
* @var string|null
*
* @ORM\Column(length=6, nullable=true)
*/
private $phoneCode = null;
/**
* @var StaCurrency|null
*
* @ORM\ManyToOne(targetEntity="StaCurrency")
* @ORM\JoinColumn(referencedColumnName="code", name="currency_code", nullable=true)
*/
private $currency;
/**
* @return string
*/
public function getCode(): string
{
return $this->code;
}
/**
* @param string $code
* @return LocationCountry
*/
public function setCode(string $code): LocationCountry
{
$this->code = $code;
return $this;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
* @return LocationCountry
*/
public function setName(string $name): LocationCountry
{
$this->name = $name;
return $this;
}
/**
* @return string|null
*/
public function getPhoneCode(): ?string
{
return $this->phoneCode;
}
/**
* @param string|null $phoneCode
* @return LocationCountry
*/
public function setPhoneCode(?string $phoneCode): LocationCountry
{
$this->phoneCode = $phoneCode;
return $this;
}
/**
* @return StaCurrency|null
*/
public function getCurrency(): ?StaCurrency
{
return $this->currency;
}
/**
* @param StaCurrency|null $currency
* @return LocationCountry
*/
public function setCurrency(?StaCurrency $currency): LocationCountry
{
$this->currency = $currency;
return $this;
}
}