src/Entity/System/Country.php line 17

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