<?php
namespace App\Entity\System;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\System\CountryRepository")
*
* @ORM\Table(name="ps_country")
*/
class Country
{
public const SPAIN_ID = 6;
public const ROMANIA_ID = 36;
public const SPAIN_CODE = 'ES';
public const GREECE_CODE = 'GR';
public const HELLENIC_CODE = 'EL';
public const UNITED_KINGDOM_CODE = 'GB';
public const ITALY_CODE = 'IT';
public const GERMANY_CODE = 'DE';
public const BULGARY_CODE = 'BG';
public const CYPRUS_CODE = 'CY';
public const COUNTRIES_EXCLUDED_FOR_CATALOG_CECOTEC = [
self::GREECE_CODE,
self::BULGARY_CODE,
self::CYPRUS_CODE,
];
/**
* @var int
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer", name="id_country")
*/
private $id;
/**
* @var Zone
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Zone")
*
* @ORM\JoinColumn(name="id_zone", referencedColumnName="id_zone")
*/
private $zone;
/**
* @var int
*
* @ORM\Column(type="integer")
*/
private $idCurrency;
/**
* @var string
*
* @ORM\Column(type="string", length=3)
*/
private $isoCode;
/**
* @var int
*
* @ORM\Column(type="integer", length=10, options={"default" : 0})
*/
private $callPrefix;
/**
* @var bool
*
* @ORM\Column(type="boolean", length=1)
*/
private $active;
/**
* @var bool
*
* @ORM\Column(type="boolean", length=1, options={"default" : 0})
*/
private $containsStates;
/**
* @var bool
*
* @ORM\Column(type="boolean", length=1, options={"default" : 0})
*/
private $needIdentificationNumber;
/**
* @var bool
*
* @ORM\Column(type="boolean", length=1, options={"default" : 1})
*/
private $needZipCode;
/**
* @var string
*
* @ORM\Column(type="string", length=12, options={"default" : ""})
*/
private $zipCodeFormat;
/**
* @var bool
*
* @ORM\Column(type="boolean", length=1)
*/
private $displayTaxLabel;
/**
* @var bool
*
* @ORM\Column(type="boolean", name="isFreeWarehouse", length=1, options={"default" : 1})
*/
private $isFreeWarehouse;
/**
* @ORM\OneToMany(targetEntity="App\Entity\System\Address", mappedBy="country")
*/
private $addresses;
/**
* @var CountryLanguage[]|ArrayCollection
*
* @ORM\OneToMany(targetEntity="App\Entity\System\CountryLanguage", mappedBy="country")
*/
private $countryLanguages;
public function __construct()
{
$this->idCurrency = 0;
$this->callPrefix = 0;
$this->active = false;
$this->containsStates = false;
$this->needIdentificationNumber = false;
$this->needZipCode = true;
$this->zipCodeFormat = '';
$this->isFreeWarehouse = true;
$this->countryLanguages = new ArrayCollection();
$this->addresses = new ArrayCollection();
$this->isoCode = '';
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*
* @return Country
*/
public function setId(int $id): Country
{
$this->id = $id;
return $this;
}
/**
* @return Zone
*/
public function getZone(): Zone
{
return $this->zone;
}
/**
* @param Zone $zone
*
* @return Country
*/
public function setZone(Zone $zone): Country
{
$this->zone = $zone;
return $this;
}
/**
* @return int
*/
public function getIdCurrency(): int
{
return $this->idCurrency;
}
/**
* @param int $idCurrency
*
* @return Country
*/
public function setIdCurrency(int $idCurrency): Country
{
$this->idCurrency = $idCurrency;
return $this;
}
/**
* @return string
*/
public function getIsoCode(): string
{
return $this->isoCode;
}
/**
* @param string $isoCode
*
* @return Country
*/
public function setIsoCode(string $isoCode): Country
{
$this->isoCode = $isoCode;
return $this;
}
/**
* @return int
*/
public function getCallPrefix(): int
{
return $this->callPrefix;
}
/**
* @param int $callPrefix
*
* @return Country
*/
public function setCallPrefix(int $callPrefix): Country
{
$this->callPrefix = $callPrefix;
return $this;
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;
}
/**
* @param bool $active
*
* @return Country
*/
public function setActive(bool $active): Country
{
$this->active = $active;
return $this;
}
/**
* @return bool
*/
public function isContainsStates(): bool
{
return $this->containsStates;
}
/**
* @param bool $containsStates
*
* @return Country
*/
public function setContainsStates(bool $containsStates): Country
{
$this->containsStates = $containsStates;
return $this;
}
/**
* @return bool
*/
public function isNeedIdentificationNumber(): bool
{
return $this->needIdentificationNumber;
}
/**
* @param bool $needIdentificationNumber
*
* @return Country
*/
public function setNeedIdentificationNumber(bool $needIdentificationNumber): Country
{
$this->needIdentificationNumber = $needIdentificationNumber;
return $this;
}
/**
* @return bool
*/
public function isNeedZipCode(): bool
{
return $this->needZipCode;
}
/**
* @param bool $needZipCode
*
* @return Country
*/
public function setNeedZipCode(bool $needZipCode): Country
{
$this->needZipCode = $needZipCode;
return $this;
}
/**
* @return string
*/
public function getZipCodeFormat(): string
{
return $this->zipCodeFormat;
}
/**
* @param string $zipCodeFormat
*
* @return Country
*/
public function setZipCodeFormat(string $zipCodeFormat): Country
{
$this->zipCodeFormat = $zipCodeFormat;
return $this;
}
/**
* @return bool
*/
public function isDisplayTaxLabel(): bool
{
return $this->displayTaxLabel;
}
/**
* @param bool $displayTaxLabel
*
* @return Country
*/
public function setDisplayTaxLabel(bool $displayTaxLabel): Country
{
$this->displayTaxLabel = $displayTaxLabel;
return $this;
}
/**
* @return bool
*/
public function isFreeWarehouse(): bool
{
return $this->isFreeWarehouse;
}
/**
* @param bool $isFreeWarehouse
*
* @return Country
*/
public function setIsFreeWarehouse(bool $isFreeWarehouse): Country
{
$this->isFreeWarehouse = $isFreeWarehouse;
return $this;
}
/**
* @return mixed
*/
public function getAddresses()
{
return $this->addresses;
}
/**
* @param mixed $addresses
*
* @return Country
*/
public function setAddresses($addresses): Country
{
$this->addresses = $addresses;
return $this;
}
/**
* @return CountryLanguage[]|ArrayCollection
*/
public function getCountryLanguages()
{
return $this->countryLanguages;
}
/**
* @param CountryLanguage[]|ArrayCollection $countryLanguages
*
* @return Country
*/
public function setCountryLanguages(array $countryLanguages): self
{
$this->countryLanguages = $countryLanguages;
return $this;
}
}