src/Entity/System/Country.php line 13

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