src/Entity/System/Country.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\System\CountryRepository")
  7.  *
  8.  * @ORM\Table(name="ps_country", indexes={
  9.  *
  10.  *     @ORM\Index(name="country_iso_code", columns={"iso_code"})
  11.  * })
  12.  */
  13. class Country
  14. {
  15.     public const SPAIN_ID 6;
  16.     public const FRANCE_ID 8;
  17.     public const ROMANIA_ID 36;
  18.     public const SPAIN_CODE 'ES';
  19.     public const GREECE_CODE 'GR';
  20.     public const HELLENIC_CODE 'EL';
  21.     public const UNITED_KINGDOM_CODE 'GB';
  22.     public const ITALY_CODE 'IT';
  23.     public const GERMANY_CODE 'DE';
  24.     public const BULGARY_CODE 'BG';
  25.     public const CYPRUS_CODE 'CY';
  26.     public const UNITED_STATES 'US';
  27.     public const BELGIUM_CODE 'BE';
  28.     public const FRANCE_CODE 'FR';
  29.     public const NETHERLANDS_CODE 'NL';
  30.     public const AUSTRIA_CODE 'AT';
  31.     public const CROATIAN_CODE 'HR';
  32.     public const CZECH_CODE 'CZ';
  33.     public const DENMARK_CODE 'DK';
  34.     public const ESTONIAN_CODE 'EE';
  35.     public const FINLAND_CODE 'FI';
  36.     public const HUNGARY_CODE 'HU';
  37.     public const IRELAND_CODE 'IE';
  38.     public const LATVIA_CODE 'LV';
  39.     public const LITHUANIA_CODE 'LT';
  40.     public const LUXEMBURGO_CODE '';
  41.     public const MALTA_CODE 'MT';
  42.     public const SWEDEN_CODE 'SE';
  43.     public const SWITZERLAND_CODE 'CH';
  44.     public const NORWAY_CODE 'NO';
  45.     public const POLAND_CODE 'PL';
  46.     public const PORTUGAL_CODE 'PT';
  47.     public const ROMANIA_CODE 'RO';
  48.     public const SLOVAKIA_CODE 'SK';
  49.     public const SLOVENIA_CODE 'SI';
  50.     public const COUNTRIES_EXCLUDED_FOR_CATALOG_CECOTEC = [
  51.         self::GREECE_CODE,
  52.         self::BULGARY_CODE,
  53.         self::CYPRUS_CODE,
  54.     ];
  55.     /**
  56.      * @var int
  57.      *
  58.      * @ORM\Id
  59.      *
  60.      * @ORM\GeneratedValue(strategy="NONE")
  61.      *
  62.      * @ORM\Column(type="integer", name="id_country", length=10, options={"unsigned":true})
  63.      */
  64.     private $id;
  65.     /**
  66.      * @var Zone
  67.      *
  68.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Zone")
  69.      *
  70.      * @ORM\JoinColumn(name="id_zone", referencedColumnName="id_zone")
  71.      */
  72.     private $zone;
  73.     /**
  74.      * @var int
  75.      *
  76.      * @ORM\Column(type="integer")
  77.      */
  78.     private $idCurrency;
  79.     /**
  80.      * @var string
  81.      *
  82.      * @ORM\Column(type="string", length=3)
  83.      */
  84.     private $isoCode;
  85.     /**
  86.      * @var int
  87.      *
  88.      * @ORM\Column(type="integer", length=10, options={"default" : 0})
  89.      */
  90.     private $callPrefix;
  91.     /**
  92.      * @var bool
  93.      *
  94.      * @ORM\Column(type="boolean", length=1)
  95.      */
  96.     private $active;
  97.     /**
  98.      * @var bool
  99.      *
  100.      * @ORM\Column(type="boolean", length=1, options={"default" : 0})
  101.      */
  102.     private $containsStates;
  103.     /**
  104.      * @var bool
  105.      *
  106.      * @ORM\Column(type="boolean", length=1, options={"default" : 0})
  107.      */
  108.     private $needIdentificationNumber;
  109.     /**
  110.      * @var bool
  111.      *
  112.      * @ORM\Column(type="boolean", length=1, options={"default" : 1})
  113.      */
  114.     private $needZipCode;
  115.     /**
  116.      * @var string
  117.      *
  118.      * @ORM\Column(type="string", length=12, options={"default" : ""})
  119.      */
  120.     private $zipCodeFormat;
  121.     /**
  122.      * @var bool
  123.      *
  124.      * @ORM\Column(type="boolean", length=1)
  125.      */
  126.     private $displayTaxLabel;
  127.     /**
  128.      * @var bool
  129.      *
  130.      * @ORM\Column(type="boolean", name="isFreeWarehouse", length=1, options={"default" : 1})
  131.      */
  132.     private $isFreeWarehouse;
  133.     /**
  134.      * @ORM\OneToMany(targetEntity="App\Entity\System\Address", mappedBy="country")
  135.      */
  136.     private $addresses;
  137.     /**
  138.      * @var CountryLanguage[]|ArrayCollection
  139.      *
  140.      * @ORM\OneToMany(targetEntity="App\Entity\System\CountryLanguage", mappedBy="country")
  141.      */
  142.     private $countryLanguages;
  143.     public function __construct()
  144.     {
  145.         $this->idCurrency 0;
  146.         $this->callPrefix 0;
  147.         $this->active false;
  148.         $this->containsStates false;
  149.         $this->needIdentificationNumber false;
  150.         $this->needZipCode true;
  151.         $this->zipCodeFormat '';
  152.         $this->isFreeWarehouse true;
  153.         $this->countryLanguages = new ArrayCollection();
  154.         $this->addresses = new ArrayCollection();
  155.         $this->isoCode '';
  156.     }
  157.     /**
  158.      * @return int
  159.      */
  160.     public function getId(): int
  161.     {
  162.         return $this->id;
  163.     }
  164.     /**
  165.      * @param int $id
  166.      *
  167.      * @return Country
  168.      */
  169.     public function setId(int $id): Country
  170.     {
  171.         $this->id $id;
  172.         return $this;
  173.     }
  174.     /**
  175.      * @return Zone
  176.      */
  177.     public function getZone(): Zone
  178.     {
  179.         return $this->zone;
  180.     }
  181.     /**
  182.      * @param Zone $zone
  183.      *
  184.      * @return Country
  185.      */
  186.     public function setZone(Zone $zone): Country
  187.     {
  188.         $this->zone $zone;
  189.         return $this;
  190.     }
  191.     /**
  192.      * @return int
  193.      */
  194.     public function getIdCurrency(): int
  195.     {
  196.         return $this->idCurrency;
  197.     }
  198.     /**
  199.      * @param int $idCurrency
  200.      *
  201.      * @return Country
  202.      */
  203.     public function setIdCurrency(int $idCurrency): Country
  204.     {
  205.         $this->idCurrency $idCurrency;
  206.         return $this;
  207.     }
  208.     /**
  209.      * @return string
  210.      */
  211.     public function getIsoCode(): string
  212.     {
  213.         return $this->isoCode;
  214.     }
  215.     /**
  216.      * @param string $isoCode
  217.      *
  218.      * @return Country
  219.      */
  220.     public function setIsoCode(string $isoCode): Country
  221.     {
  222.         $this->isoCode $isoCode;
  223.         return $this;
  224.     }
  225.     /**
  226.      * @return int
  227.      */
  228.     public function getCallPrefix(): int
  229.     {
  230.         return $this->callPrefix;
  231.     }
  232.     /**
  233.      * @param int $callPrefix
  234.      *
  235.      * @return Country
  236.      */
  237.     public function setCallPrefix(int $callPrefix): Country
  238.     {
  239.         $this->callPrefix $callPrefix;
  240.         return $this;
  241.     }
  242.     /**
  243.      * @return bool
  244.      */
  245.     public function isActive(): bool
  246.     {
  247.         return $this->active;
  248.     }
  249.     /**
  250.      * @param bool $active
  251.      *
  252.      * @return Country
  253.      */
  254.     public function setActive(bool $active): Country
  255.     {
  256.         $this->active $active;
  257.         return $this;
  258.     }
  259.     /**
  260.      * @return bool
  261.      */
  262.     public function isContainsStates(): bool
  263.     {
  264.         return $this->containsStates;
  265.     }
  266.     /**
  267.      * @param bool $containsStates
  268.      *
  269.      * @return Country
  270.      */
  271.     public function setContainsStates(bool $containsStates): Country
  272.     {
  273.         $this->containsStates $containsStates;
  274.         return $this;
  275.     }
  276.     /**
  277.      * @return bool
  278.      */
  279.     public function isNeedIdentificationNumber(): bool
  280.     {
  281.         return $this->needIdentificationNumber;
  282.     }
  283.     /**
  284.      * @param bool $needIdentificationNumber
  285.      *
  286.      * @return Country
  287.      */
  288.     public function setNeedIdentificationNumber(bool $needIdentificationNumber): Country
  289.     {
  290.         $this->needIdentificationNumber $needIdentificationNumber;
  291.         return $this;
  292.     }
  293.     /**
  294.      * @return bool
  295.      */
  296.     public function isNeedZipCode(): bool
  297.     {
  298.         return $this->needZipCode;
  299.     }
  300.     /**
  301.      * @param bool $needZipCode
  302.      *
  303.      * @return Country
  304.      */
  305.     public function setNeedZipCode(bool $needZipCode): Country
  306.     {
  307.         $this->needZipCode $needZipCode;
  308.         return $this;
  309.     }
  310.     /**
  311.      * @return string
  312.      */
  313.     public function getZipCodeFormat(): string
  314.     {
  315.         return $this->zipCodeFormat;
  316.     }
  317.     /**
  318.      * @param string $zipCodeFormat
  319.      *
  320.      * @return Country
  321.      */
  322.     public function setZipCodeFormat(string $zipCodeFormat): Country
  323.     {
  324.         $this->zipCodeFormat $zipCodeFormat;
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return bool
  329.      */
  330.     public function isDisplayTaxLabel(): bool
  331.     {
  332.         return $this->displayTaxLabel;
  333.     }
  334.     /**
  335.      * @param bool $displayTaxLabel
  336.      *
  337.      * @return Country
  338.      */
  339.     public function setDisplayTaxLabel(bool $displayTaxLabel): Country
  340.     {
  341.         $this->displayTaxLabel $displayTaxLabel;
  342.         return $this;
  343.     }
  344.     /**
  345.      * @return bool
  346.      */
  347.     public function isFreeWarehouse(): bool
  348.     {
  349.         return $this->isFreeWarehouse;
  350.     }
  351.     /**
  352.      * @param bool $isFreeWarehouse
  353.      *
  354.      * @return Country
  355.      */
  356.     public function setIsFreeWarehouse(bool $isFreeWarehouse): Country
  357.     {
  358.         $this->isFreeWarehouse $isFreeWarehouse;
  359.         return $this;
  360.     }
  361.     /**
  362.      * @return mixed
  363.      */
  364.     public function getAddresses()
  365.     {
  366.         return $this->addresses;
  367.     }
  368.     /**
  369.      * @param mixed $addresses
  370.      *
  371.      * @return Country
  372.      */
  373.     public function setAddresses($addresses): Country
  374.     {
  375.         $this->addresses $addresses;
  376.         return $this;
  377.     }
  378.     /**
  379.      * @return CountryLanguage[]|ArrayCollection
  380.      */
  381.     public function getCountryLanguages()
  382.     {
  383.         return $this->countryLanguages;
  384.     }
  385.     /**
  386.      * @param CountryLanguage[]|ArrayCollection $countryLanguages
  387.      *
  388.      * @return Country
  389.      */
  390.     public function setCountryLanguages(array $countryLanguages): self
  391.     {
  392.         $this->countryLanguages $countryLanguages;
  393.         return $this;
  394.     }
  395. }