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