src/Entity/System/ServiceProduct.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity
  6. *
  7. * @ORM\Table(name="ps_service_product")
  8. *
  9. * @ORM\Entity(repositoryClass="App\Repository\System\ServiceProductRepository")
  10. */
  11. class ServiceProduct
  12. {
  13. public const AMAZON_EBAY_SERVICE_ID = 95289;
  14. public const ALIEXPRESS_SERVICE_ID = 102221;
  15. public const FNAC_SERVICE_ID = 116983;
  16. public const CDISCOUNT_SERVICE_ID = 120519;
  17. public const RAKUTEN_SERVICE_ID = 102222;
  18. public const CARREFOUR_SERVICE_ID = 116984;
  19. public const DARTY_SERVICE_ID = 120520;
  20. public const EPRICE_SERVICE_ID = 121729;
  21. public const RUEDUCOMMERCE_SERVICE_ID = 121731;
  22. public const CONFORAMA_SERVICE_ID = 121730;
  23. public const REAL_SERVICE_ID = 131973;
  24. public const BOL_SERVICE_ID = 131974;
  25. public const SHOPIFY_CONECTOR_ID = 95291;
  26. public const PRESTASHOP_CONECTOR_ID = 95290;
  27. public const WOOCOMMERCE_CONECTOR_ID = 121732;
  28. public const MAGENTO_CONECTOR_ID = 169260;
  29. public const SHOP_IBIZA = 41256;
  30. public const SHOP_SHOPIFY = 95084;
  31. public const BOL_CONECTOR_ID = 131974;
  32. public const MARKETPLACES_5x = 218735;
  33. public const PC_COMPONENTES_SERVICE_ID = 206126;
  34. public const WORTEN_SERVICE_ID = 270665;
  35. public const ALLEGRO_SERVICE_ID = 314083;
  36. public const LEROY_MERLIN_SERVICE_ID = 347188;
  37. public const WIX_SERVICE_ID = 364343;
  38. public const CDON_SERVICE_ID = 442297;
  39. public const WISH_SERVICE_ID = 448860;
  40. public const BACKMARKET_SERVICE_ID = 448991;
  41. public const CARREFOUR_FR_SERVICE_ID = 449719;
  42. public const SERVICE_PRODUCT_SHOP_SHOPIFY_360_TYPE_ID = 10;
  43. public const ELECLERC_SERVICE_ID = 477824;
  44. public const AMAZON_RAKUTEN_SERVICE_ID = 756394;
  45. public const AMAZON_WORTEN_SERVICE_ID = 758387;
  46. public const AMAZON_KAUFLAND_SERVICE_ID = 758391;
  47. public const AMAZON_FNAC_SERVICE_ID = 758419;
  48. public const AMAZON_EPRICE_SERVICE_ID = 758421;
  49. public const AMAZON_CDON_SERVICE_ID = 758422;
  50. public const EBAY_SERVICE_ID = 758423;
  51. public const AMAZON_SERVICE_ID = 806955;
  52. public const VIDAXL_SERVICE_ID = 131972;
  53. public const VENCA_SERVICE_ID = 131976;
  54. public const PERFUMESCLUB_SERVICE_ID = 491253;
  55. public const MEDIAMARKT_ES_SERVICE_ID = 1014998;
  56. public const MEDIAMARKT_DE_SERVICE_ID = 1015099;
  57. public const MEDIAMARKT_IT_SERVICE_ID = 1106825;
  58. public const MANOMANO_SERVICE_ID = 1118101;
  59. public const REFURBED_SERVICE_ID = 1118102;
  60. public const SPRINTER_SERVICE_ID = 1118103;
  61. public const CLUBEFASHION_SERVICE_ID = 1118104;
  62. public const DECATHLON_SERVICE_ID = 1300703;
  63. public const MIRAVIA_SERVICE_ID = 673854;
  64. public const ECOMMERCE_PACK_ALLOWED_SERVICES = [
  65. self::SHOP_IBIZA,
  66. self::SHOP_SHOPIFY,
  67. self::PRESTASHOP_CONECTOR_ID,
  68. self::SHOPIFY_CONECTOR_ID,
  69. self::WOOCOMMERCE_CONECTOR_ID,
  70. self::MAGENTO_CONECTOR_ID,
  71. self::WIX_SERVICE_ID,
  72. ];
  73. public const COMBO_CONECTOR_PRODUCTS = [
  74. self::MARKETPLACES_5x,
  75. self::AMAZON_RAKUTEN_SERVICE_ID,
  76. self::AMAZON_WORTEN_SERVICE_ID,
  77. self::AMAZON_KAUFLAND_SERVICE_ID,
  78. self::AMAZON_FNAC_SERVICE_ID,
  79. self::AMAZON_EPRICE_SERVICE_ID,
  80. self::CDON_SERVICE_ID,
  81. ];
  82. public const AVAILABLE_COUNTRY_ISO_CODES_INDEXED_BY_SERVICE_ID = [
  83. self::AMAZON_SERVICE_ID => ['es', 'fr', 'it', 'de', 'be', 'sv', 'nl', 'pl', 'en', 'ir', ],
  84. self::EBAY_SERVICE_ID => ['es', 'fr', 'it', 'de', 'be', 'sw', 'au', 'nl', 'pl', 'en', 'ir', ],
  85. self::RAKUTEN_SERVICE_ID => ['fr', ],
  86. self::WORTEN_SERVICE_ID => ['es', 'pt', ],
  87. self::REAL_SERVICE_ID => ['fr', 'it', 'de', 'sk', 'cz', 'pl', 'au', ],
  88. self::FNAC_SERVICE_ID => ['es', 'fr', 'pt', 'be', 'sw', ],
  89. self::EPRICE_SERVICE_ID => ['it', ],
  90. self::CDON_SERVICE_ID => ['se', 'no', 'dk', 'fi', ],
  91. self::ALIEXPRESS_SERVICE_ID => ['es', 'fr', 'it', ],
  92. self::CDISCOUNT_SERVICE_ID => ['fr', ],
  93. self::CARREFOUR_SERVICE_ID => ['es', ],
  94. self::DARTY_SERVICE_ID => ['fr', ],
  95. self::RUEDUCOMMERCE_SERVICE_ID => ['fr', ],
  96. self::CONFORAMA_SERVICE_ID => ['fr', ],
  97. self::ALLEGRO_SERVICE_ID => ['pl', 'cz', 'sk', 'hu', ],
  98. self::LEROY_MERLIN_SERVICE_ID => ['fr', 'it', 'es', 'pt', ],
  99. self::CARREFOUR_FR_SERVICE_ID => ['fr', ],
  100. self::WISH_SERVICE_ID => ['es', 'pt', 'fr', 'de', 'it', 'en', 'no', 'sw', 'be', 'nl', 'au', 'cz', ],
  101. self::ELECLERC_SERVICE_ID => ['fr', ],
  102. self::BACKMARKET_SERVICE_ID => ['fr', 'au', 'be', 'de', 'es', 'en', 'gr', 'ir', 'it', 'nl', 'se', 'sk', ],
  103. self::MEDIAMARKT_ES_SERVICE_ID => ['es', ],
  104. self::MEDIAMARKT_DE_SERVICE_ID => ['de', ],
  105. self::MEDIAMARKT_IT_SERVICE_ID => ['it', ],
  106. self::MANOMANO_SERVICE_ID => ['es', 'de', 'fr', 'it'],
  107. self::REFURBED_SERVICE_ID => ['de', ],
  108. self::SPRINTER_SERVICE_ID => ['pt', ],
  109. self::CLUBEFASHION_SERVICE_ID => ['pt', ],
  110. self::DECATHLON_SERVICE_ID => ['es', 'pt', 'fr', 'it', 'nl', 'be', 'pl'],
  111. self::MIRAVIA_SERVICE_ID => ['es', ],
  112. ];
  113. public const MIP_ADDITIONAL_SERVICE_DATA_INDEXED_BY_NAME = [
  114. 'marketplaces' => ['id' => self::AMAZON_EBAY_SERVICE_ID, 'price' => '199'],
  115. 'prestashop' => ['id' => self::PRESTASHOP_CONECTOR_ID, 'price' => '149'],
  116. 'shopify' => ['id' => self::SHOPIFY_CONECTOR_ID, 'price' => '129'],
  117. 'wooCommerce' => ['id' => self::WOOCOMMERCE_CONECTOR_ID, 'price' => '149'],
  118. 'aliexpress' => ['id' => self::ALIEXPRESS_SERVICE_ID, 'price' => '29'],
  119. 'rakuten' => ['id' => self::RAKUTEN_SERVICE_ID, 'price' => '29'],
  120. 'fnac' => ['id' => self::FNAC_SERVICE_ID, 'price' => '49'],
  121. 'carrefour' => ['id' => self::CARREFOUR_SERVICE_ID, 'price' => '29'],
  122. 'darty' => ['id' => self::DARTY_SERVICE_ID, 'price' => '29'],
  123. 'cdiscount' => ['id' => self::CDISCOUNT_SERVICE_ID, 'price' => '49'],
  124. 'eprice' => ['id' => self::EPRICE_SERVICE_ID, 'price' => '29'],
  125. 'rueducommerce' => ['id' => self::RUEDUCOMMERCE_SERVICE_ID, 'price' => '29'],
  126. 'conforama' => ['id' => self::CONFORAMA_SERVICE_ID, 'price' => '29'],
  127. 'vidaxl' => ['id' => self::VIDAXL_SERVICE_ID, 'price' => '199'],
  128. 'real' => ['id' => self::REAL_SERVICE_ID, 'price' => '49'],
  129. 'bolcom' => ['id' => self::BOL_SERVICE_ID, 'price' => '199'],
  130. 'venca' => ['id' => self::VENCA_SERVICE_ID, 'price' => '199'],
  131. 'magento' => ['id' => self::MAGENTO_CONECTOR_ID, 'price' => '199'],
  132. '5xconectores' => ['id' => self::MARKETPLACES_5x, 'price' => '159'],
  133. 'pc_componentes' => ['id' => self::PC_COMPONENTES_SERVICE_ID, 'price' => '29'],
  134. 'worten' => ['id' => self::WORTEN_SERVICE_ID, 'price' => '149'],
  135. 'allegro' => ['id' => self::ALLEGRO_SERVICE_ID, 'price' => '29'],
  136. 'leroy_merlin' => ['id' => self::LEROY_MERLIN_SERVICE_ID, 'price' => '49'],
  137. 'wix' => ['id' => self::WIX_SERVICE_ID, 'price' => '129'],
  138. 'carrefour_fr' => ['id' => self::CARREFOUR_FR_SERVICE_ID, 'price' => '29'],
  139. 'wish' => ['id' => self::WISH_SERVICE_ID, 'price' => '49'],
  140. 'cdon' => ['id' => self::CDON_SERVICE_ID, 'price' => '49'],
  141. 'eleclerc' => ['id' => self::ELECLERC_SERVICE_ID, 'price' => '29'],
  142. 'perfumes_club' => ['id' => self::PERFUMESCLUB_SERVICE_ID, 'price' => '0.00001'],
  143. 'amazon_rakuten' => ['id' => self::AMAZON_RAKUTEN_SERVICE_ID, 'price' => '299'],
  144. 'amazon_worten' => ['id' => self::AMAZON_WORTEN_SERVICE_ID, 'price' => '299'],
  145. 'amazon_kaufland' => ['id' => self::AMAZON_KAUFLAND_SERVICE_ID, 'price' => '299'],
  146. 'amazon_fnac' => ['id' => self::AMAZON_FNAC_SERVICE_ID, 'price' => '299'],
  147. 'amazon_eprice' => ['id' => self::AMAZON_EPRICE_SERVICE_ID, 'price' => '0.00001'],
  148. 'amazon_cdon' => ['id' => self::AMAZON_CDON_SERVICE_ID, 'price' => '299'],
  149. 'ebay' => ['id' => self::EBAY_SERVICE_ID, 'price' => '99'],
  150. 'amazon' => ['id' => self::AMAZON_SERVICE_ID, 'price' => '119'],
  151. 'mediamarkt_es' => ['id' => self::MEDIAMARKT_ES_SERVICE_ID, 'price' => '69'],
  152. 'mediamarkt_de' => ['id' => self::MEDIAMARKT_DE_SERVICE_ID, 'price' => '69'],
  153. 'mediamarkt_it' => ['id' => self::MEDIAMARKT_IT_SERVICE_ID, 'price' => '49'],
  154. 'manomano' => ['id' => self::MANOMANO_SERVICE_ID, 'price' => '69'],
  155. 'refurbed' => ['id' => self::REFURBED_SERVICE_ID, 'price' => '49'],
  156. 'backmarket' => ['id' => self::BACKMARKET_SERVICE_ID, 'price' => '49'],
  157. 'sprinter' => ['id' => self::SPRINTER_SERVICE_ID, 'price' => '49'],
  158. 'clubefashion' => ['id' => self::CLUBEFASHION_SERVICE_ID, 'price' => '49'],
  159. 'decathlon' => ['id' => self::DECATHLON_SERVICE_ID, 'price' => '69'],
  160. 'miravia' => ['id' => self::MIRAVIA_SERVICE_ID, 'price' => '99'],
  161. ];
  162. /**
  163. * @var int
  164. *
  165. * @ORM\Id()
  166. *
  167. * @ORM\GeneratedValue()
  168. *
  169. * @ORM\Column(type="integer", name="id_service_product")
  170. */
  171. private $id;
  172. /**
  173. * @var Service
  174. *
  175. * @ORM\ManyToOne(targetEntity="App\Entity\System\Service")
  176. *
  177. * @ORM\JoinColumn(name="id_service", referencedColumnName="id_service", nullable=false)
  178. */
  179. private $service;
  180. /**
  181. * @var Product
  182. *
  183. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product")
  184. *
  185. * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product", nullable=false)
  186. */
  187. private $product;
  188. /**
  189. * @var ServiceProductType
  190. *
  191. * @ORM\ManyToOne(targetEntity="App\Entity\System\ServiceProductType")
  192. *
  193. * @ORM\JoinColumn(nullable=false, name="type")
  194. */
  195. private $type;
  196. public function getId(): int
  197. {
  198. return $this->id;
  199. }
  200. public function setId(int $id): ServiceProduct
  201. {
  202. $this->id = $id;
  203. return $this;
  204. }
  205. public function getService(): Service
  206. {
  207. return $this->service;
  208. }
  209. public function setService(Service $service): ServiceProduct
  210. {
  211. $this->service = $service;
  212. return $this;
  213. }
  214. public function getProduct(): Product
  215. {
  216. return $this->product;
  217. }
  218. public function setProduct(Product $product): ServiceProduct
  219. {
  220. $this->product = $product;
  221. return $this;
  222. }
  223. public function getType(): ServiceProductType
  224. {
  225. return $this->type;
  226. }
  227. public function setType(ServiceProductType $type): ServiceProduct
  228. {
  229. $this->type = $type;
  230. return $this;
  231. }
  232. }