<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\SerializedName;
/**
* Countries
*
* @ORM\Table(name="countries")
* @ORM\Entity(repositoryClass="App\Repository\CountriesRepository")
*/
class Countries
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"countries"})
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="country_name", type="string", length=255)
* @Groups({"countries"})
*/
private $countryName;
/**
* @var string
*
* @ORM\Column(name="iso_code_2", type="string", length=255)
*/
private $isoCode2;
/**
* @var string
*
* @ORM\Column(name="iso_code_3", type="string", length=255)
*/
private $isoCode3;
/**
* @var string
*
* @ORM\Column(name="address_format", type="text")
*/
private $addressFormat;
/**
* @var bool
*
* @ORM\Column(name="postcode_required", type="boolean")
*/
private $postcodeRequired;
/**
* @var bool
*
* @ORM\Column(name="status", type="boolean")
*/
private $status;
/**
* @var bool
*
* @ORM\Column(name="is_ue", type="boolean")
*/
private $isUe;
/**
* @var int
*
* @ORM\Column(name="risk_id", type="integer")
*/
private $riskId;
/**
* @ORM\Column(type="boolean")
* @Groups({"countries"})
*/
private $mmol_unit;
/**
* @ORM\Column(type="integer", options={"default" : 1})
* @Groups({"countries"})
*/
private $unit_measure;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set countryName
*
* @param string $countryName
*
* @return Countries
*/
public function setCountryName($countryName)
{
$this->countryName = $countryName;
return $this;
}
/**
* Get countryName
*
* @return string
*/
public function getCountryName()
{
return $this->countryName;
}
/**
* Set isoCode2
*
* @param string $isoCode2
*
* @return Countries
*/
public function setIsoCode2($isoCode2)
{
$this->isoCode2 = $isoCode2;
return $this;
}
/**
* Get isoCode2
*
* @return string
*/
public function getIsoCode2()
{
return $this->isoCode2;
}
/**
* Set isoCode3
*
* @param string $isoCode3
*
* @return Countries
*/
public function setIsoCode3($isoCode3)
{
$this->isoCode3 = $isoCode3;
return $this;
}
/**
* Get isoCode3
*
* @return string
*/
public function getIsoCode3()
{
return $this->isoCode3;
}
/**
* Set addressFormat
*
* @param string $addressFormat
*
* @return Countries
*/
public function setAddressFormat($addressFormat)
{
$this->addressFormat = $addressFormat;
return $this;
}
/**
* Get addressFormat
*
* @return string
*/
public function getAddressFormat()
{
return $this->addressFormat;
}
/**
* Set postcodeRequired
*
* @param boolean $postcodeRequired
*
* @return Countries
*/
public function setPostcodeRequired($postcodeRequired)
{
$this->postcodeRequired = $postcodeRequired;
return $this;
}
/**
* Get postcodeRequired
*
* @return bool
*/
public function getPostcodeRequired()
{
return $this->postcodeRequired;
}
/**
* Set status
*
* @param boolean $status
*
* @return Countries
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return bool
*/
public function getStatus()
{
return $this->status;
}
/**
* Set isUe
*
* @param boolean $isUe
*
* @return Countries
*/
public function setIsUe($isUe)
{
$this->isUe = $isUe;
return $this;
}
/**
* Get isUe
*
* @return bool
*/
public function getIsUe()
{
return $this->isUe;
}
/**
* Set riskId
*
* @param integer $riskId
*
* @return Countries
*/
public function setRiskId($riskId)
{
$this->riskId = $riskId;
return $this;
}
/**
* Get riskId
*
* @return int
*/
public function getRiskId()
{
return $this->riskId;
}
/**
* @Groups({"countries"})
* @SerializedName("flag1x1")
*/
public function getFlag1x1()
{
return '/images/flags/1x1/' . strtolower($this->isoCode2) . '.svg';
}
/**
* @Groups({"countries"})
* @SerializedName("flag4x3")
*/
public function getFlag4x3()
{
return '/images/flags/4x3/' . strtolower($this->isoCode2) . '.svg';
}
/**
* @Groups({"countries"})
* @SerializedName("flag1x1Png")
*/
public function getFlag1x1Png()
{
return '/images/flags/1x1png/' . strtolower($this->isoCode2) . '.png';
}
public function getMmolUnit(): ?bool
{
return $this->mmol_unit;
}
public function setMmolUnit(bool $mmol_unit): self
{
$this->mmol_unit = $mmol_unit;
return $this;
}
public function getUnitMeasure(): ?int
{
return $this->unit_measure;
}
public function setUnitMeasure(int $unit_measure): self
{
$this->unit_measure = $unit_measure;
return $this;
}
}