<?php
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* Pack
*
* @ORM\Table(name="ps_pack")
*
* @ORM\Entity(repositoryClass="App\Repository\System\PackRepository")
*/
class Pack
{
public const PACK_WITHOUT_PACK = 0;
public const PACK_WITHOUT_PACK_NAME = 'NONE';
public const PACK_BASIC = 1;
public const PACK_BASIC_NAME = 'BASIC';
public const PACK_PRO = 2;
public const PACK_PRO_NAME = 'PRO';
public const PACK_BUSINESS = 150;
public const PACK_BUSINESS_NAME = 'BUSINESS';
public const PACK_PREMIUM = 151;
public const PACK_PREMIUM_NAME = 'PREMIUM';
public const PACK_FREE = 167;
public const PACK_FREE_NAME = 'FREE';
public const PACK_RENTING = 195;
public const PACK_RENTING_NAME = 'RENTING';
public const PACK_B2B = 201;
public const PACK_B2B_NAME = 'B2B';
public const PACK_DROPSHIP = 202;
public const PACK_DROPSHIP_NAME = 'DROPSHIP';
public const PACK_ENTERPRISE = 203;
public const PACK_ENTERPRISE_NAME = 'ENTERPRISE';
public const PACK_ECOMMERCE = 210;
public const PACK_ECOMMERCE_NAME = 'ECOMMERCE';
public const PACK_MARKETPLACES = 211;
public const PACK_MARKETPLACES_NAME = 'MARKETPLACES';
public const OLD_B2B_PRICE = 45;
public const WITHOUT_PACK_NAME = 'Welcome';
public const AVAILABLE_PACK_IDS = [
self::PACK_FREE,
self::PACK_B2B,
self::PACK_ECOMMERCE,
self::PACK_MARKETPLACES,
];
public const ALLOWED_SERVICES_BY_PACK = [
self::PACK_ECOMMERCE => [
ServiceProduct::PRESTASHOP_CONECTOR_ID,
ServiceProduct::WOOCOMMERCE_CONECTOR_ID,
ServiceProduct::SHOP_IBIZA,
ServiceProduct::SHOP_SHOPIFY,
ServiceProduct::SHOPIFY_CONECTOR_ID,
ServiceProduct::MAGENTO_CONECTOR_ID,
ServiceProduct::WIX_SERVICE_ID,
],
self::PACK_MARKETPLACES => [
ServiceProduct::AMAZON_EBAY_SERVICE_ID,
ServiceProduct::ALIEXPRESS_SERVICE_ID,
ServiceProduct::FNAC_SERVICE_ID,
ServiceProduct::CDISCOUNT_SERVICE_ID,
ServiceProduct::RAKUTEN_SERVICE_ID,
ServiceProduct::CARREFOUR_SERVICE_ID,
ServiceProduct::DARTY_SERVICE_ID,
ServiceProduct::EPRICE_SERVICE_ID,
ServiceProduct::RUEDUCOMMERCE_SERVICE_ID,
ServiceProduct::CONFORAMA_SERVICE_ID,
ServiceProduct::REAL_SERVICE_ID,
ServiceProduct::BOL_SERVICE_ID,
ServiceProduct::SHOPIFY_CONECTOR_ID,
ServiceProduct::PRESTASHOP_CONECTOR_ID,
ServiceProduct::WOOCOMMERCE_CONECTOR_ID,
ServiceProduct::MAGENTO_CONECTOR_ID,
ServiceProduct::SHOP_IBIZA,
ServiceProduct::SHOP_SHOPIFY,
ServiceProduct::MARKETPLACES_5x,
ServiceProduct::PC_COMPONENTES_SERVICE_ID,
ServiceProduct::WORTEN_SERVICE_ID,
ServiceProduct::ALLEGRO_SERVICE_ID,
ServiceProduct::WIX_SERVICE_ID,
ServiceProduct::LEROY_MERLIN_SERVICE_ID,
ServiceProduct::CDON_SERVICE_ID,
ServiceProduct::WIX_SERVICE_ID,
ServiceProduct::BACKMARKET_SERVICE_ID,
ServiceProduct::CARREFOUR_FR_SERVICE_ID,
ServiceProduct::ELECLERC_SERVICE_ID,
ServiceProduct::AMAZON_RAKUTEN_SERVICE_ID,
ServiceProduct::AMAZON_WORTEN_SERVICE_ID,
ServiceProduct::AMAZON_KAUFLAND_SERVICE_ID,
ServiceProduct::AMAZON_FNAC_SERVICE_ID,
ServiceProduct::AMAZON_EPRICE_SERVICE_ID,
ServiceProduct::AMAZON_CDON_SERVICE_ID,
ServiceProduct::EBAY_SERVICE_ID,
ServiceProduct::AMAZON_SERVICE_ID,
ServiceProduct::MEDIAMARKT_ES_SERVICE_ID,
ServiceProduct::MEDIAMARKT_DE_SERVICE_ID,
],
];
public const PACK_NAMES_INDEXED_BY_ID = [
self::PACK_WITHOUT_PACK => self::PACK_WITHOUT_PACK_NAME,
self::PACK_BASIC => self::PACK_BASIC_NAME,
self::PACK_PRO => self::PACK_PRO_NAME,
self::PACK_BUSINESS => self::PACK_BUSINESS_NAME,
self::PACK_PREMIUM => self::PACK_PREMIUM_NAME,
self::PACK_FREE => self::PACK_FREE_NAME,
self::PACK_RENTING => self::PACK_RENTING_NAME,
self::PACK_B2B => self::PACK_B2B_NAME,
self::PACK_DROPSHIP => self::PACK_DROPSHIP_NAME,
self::PACK_ENTERPRISE => self::PACK_ENTERPRISE_NAME,
self::PACK_ECOMMERCE => self::PACK_ECOMMERCE_NAME,
self::PACK_MARKETPLACES => self::PACK_MARKETPLACES_NAME,
];
public const PACK_B2B_REFERENCE = 'PACKB2B';
public const DROPSHIPPING_PACK_INDEXED_BY_ID = [
self::PACK_PRO => 'PRO',
self::PACK_BUSINESS => 'BUSINESS',
self::PACK_PREMIUM => 'PREMIUM',
self::PACK_B2B => 'B2B',
self::PACK_DROPSHIP => 'DROPSHIP',
self::PACK_ENTERPRISE => 'ENTERPRISE',
self::PACK_ECOMMERCE => 'ECOMMERCE',
self::PACK_MARKETPLACES => 'MARKETPLACES',
];
public const AVAILABLE_WHOLESALE_PACKS_IDS = [
self::PACK_ECOMMERCE,
self::PACK_MARKETPLACES,
];
/**
* @var int
*
* @ORM\Id
*
* @ORM\Column(type="integer", name="id_pack")
*/
private $id;
/**
* @var Language
*
* @ORM\Id()
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Language", inversedBy="packs")
*
* @ORM\JoinColumn(referencedColumnName="id_lang", name="id_lang")
*/
private $language;
/**
* @var string
*
* @ORM\Column(type="string", length=32)
*/
private $name;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*
* @return Pack
*/
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
/**
* @return Language
*/
public function getLanguage(): Language
{
return $this->language;
}
/**
* @param $language Language
*
* @return Pack
*/
public function setLanguage(Language $language): Pack
{
$this->language = $language;
return $this;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*
* @return Pack
*/
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
}