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