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