src/Entity/System/Pack.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Pack
  6.  *
  7.  * @ORM\Table(name="ps_pack")
  8.  *
  9.  * @ORM\Entity(repositoryClass="App\Repository\System\PackRepository")
  10.  */
  11. class Pack
  12. {
  13.     public const PACK_WITHOUT_PACK 0;
  14.     public const PACK_WITHOUT_PACK_NAME 'NONE';
  15.     public const PACK_BASIC 1;
  16.     public const PACK_BASIC_NAME 'BASIC';
  17.     public const PACK_PRO 2;
  18.     public const PACK_PRO_NAME 'PRO';
  19.     public const PACK_BUSINESS 150;
  20.     public const PACK_BUSINESS_NAME 'BUSINESS';
  21.     public const PACK_PREMIUM 151;
  22.     public const PACK_PREMIUM_NAME 'PREMIUM';
  23.     public const PACK_FREE 167;
  24.     public const PACK_FREE_NAME 'FREE';
  25.     public const PACK_RENTING 195;
  26.     public const PACK_RENTING_NAME 'RENTING';
  27.     public const PACK_B2B 201;
  28.     public const PACK_B2B_NAME 'B2B';
  29.     public const PACK_DROPSHIP 202;
  30.     public const PACK_DROPSHIP_NAME 'DROPSHIP';
  31.     public const PACK_ENTERPRISE 203;
  32.     public const PACK_ENTERPRISE_NAME 'ENTERPRISE';
  33.     public const PACK_ECOMMERCE 210;
  34.     public const PACK_ECOMMERCE_NAME 'ECOMMERCE';
  35.     public const PACK_MARKETPLACES 211;
  36.     public const PACK_MARKETPLACES_NAME 'MARKETPLACES';
  37.     public const OLD_B2B_PRICE 45;
  38.     public const WITHOUT_PACK_NAME 'Welcome';
  39.     public const AVAILABLE_PACK_IDS = [
  40.         self::PACK_FREE,
  41.         self::PACK_B2B,
  42.         self::PACK_ECOMMERCE,
  43.         self::PACK_MARKETPLACES,
  44.     ];
  45.     public const ALLOWED_SERVICES_BY_PACK = [
  46.         self::PACK_ECOMMERCE => [
  47.             ServiceProduct::PRESTASHOP_CONECTOR_ID,
  48.             ServiceProduct::WOOCOMMERCE_CONECTOR_ID,
  49.             ServiceProduct::SHOP_IBIZA,
  50.             ServiceProduct::SHOP_SHOPIFY,
  51.             ServiceProduct::SHOPIFY_CONECTOR_ID,
  52.             ServiceProduct::MAGENTO_CONECTOR_ID,
  53.             ServiceProduct::WIX_SERVICE_ID,
  54.         ],
  55.         self::PACK_MARKETPLACES => [
  56.             ServiceProduct::AMAZON_EBAY_SERVICE_ID,
  57.             ServiceProduct::ALIEXPRESS_SERVICE_ID,
  58.             ServiceProduct::FNAC_SERVICE_ID,
  59.             ServiceProduct::CDISCOUNT_SERVICE_ID,
  60.             ServiceProduct::RAKUTEN_SERVICE_ID,
  61.             ServiceProduct::CARREFOUR_SERVICE_ID,
  62.             ServiceProduct::DARTY_SERVICE_ID,
  63.             ServiceProduct::EPRICE_SERVICE_ID,
  64.             ServiceProduct::RUEDUCOMMERCE_SERVICE_ID,
  65.             ServiceProduct::CONFORAMA_SERVICE_ID,
  66.             ServiceProduct::REAL_SERVICE_ID,
  67.             ServiceProduct::BOL_SERVICE_ID,
  68.             ServiceProduct::SHOPIFY_CONECTOR_ID,
  69.             ServiceProduct::PRESTASHOP_CONECTOR_ID,
  70.             ServiceProduct::WOOCOMMERCE_CONECTOR_ID,
  71.             ServiceProduct::MAGENTO_CONECTOR_ID,
  72.             ServiceProduct::SHOP_IBIZA,
  73.             ServiceProduct::SHOP_SHOPIFY,
  74.             ServiceProduct::MARKETPLACES_5x,
  75.             ServiceProduct::PC_COMPONENTES_SERVICE_ID,
  76.             ServiceProduct::WORTEN_SERVICE_ID,
  77.             ServiceProduct::ALLEGRO_SERVICE_ID,
  78.             ServiceProduct::WIX_SERVICE_ID,
  79.             ServiceProduct::LEROY_MERLIN_SERVICE_ID,
  80.             ServiceProduct::CDON_SERVICE_ID,
  81.             ServiceProduct::WIX_SERVICE_ID,
  82.             ServiceProduct::BACKMARKET_SERVICE_ID,
  83.             ServiceProduct::CARREFOUR_FR_SERVICE_ID,
  84.             ServiceProduct::ELECLERC_SERVICE_ID,
  85.             ServiceProduct::AMAZON_RAKUTEN_SERVICE_ID,
  86.             ServiceProduct::AMAZON_WORTEN_SERVICE_ID,
  87.             ServiceProduct::AMAZON_KAUFLAND_SERVICE_ID,
  88.             ServiceProduct::AMAZON_FNAC_SERVICE_ID,
  89.             ServiceProduct::AMAZON_EPRICE_SERVICE_ID,
  90.             ServiceProduct::AMAZON_CDON_SERVICE_ID,
  91.             ServiceProduct::EBAY_SERVICE_ID,
  92.             ServiceProduct::AMAZON_SERVICE_ID,
  93.             ServiceProduct::MEDIAMARKT_ES_SERVICE_ID,
  94.             ServiceProduct::MEDIAMARKT_DE_SERVICE_ID,
  95.         ],
  96.     ];
  97.     public const PACK_NAMES_INDEXED_BY_ID = [
  98.         self::PACK_WITHOUT_PACK => self::PACK_WITHOUT_PACK_NAME,
  99.         self::PACK_BASIC => self::PACK_BASIC_NAME,
  100.         self::PACK_PRO => self::PACK_PRO_NAME,
  101.         self::PACK_BUSINESS => self::PACK_BUSINESS_NAME,
  102.         self::PACK_PREMIUM => self::PACK_PREMIUM_NAME,
  103.         self::PACK_FREE => self::PACK_FREE_NAME,
  104.         self::PACK_RENTING => self::PACK_RENTING_NAME,
  105.         self::PACK_B2B => self::PACK_B2B_NAME,
  106.         self::PACK_DROPSHIP => self::PACK_DROPSHIP_NAME,
  107.         self::PACK_ENTERPRISE => self::PACK_ENTERPRISE_NAME,
  108.         self::PACK_ECOMMERCE => self::PACK_ECOMMERCE_NAME,
  109.         self::PACK_MARKETPLACES => self::PACK_MARKETPLACES_NAME,
  110.     ];
  111.     public const PACK_B2B_REFERENCE 'PACKB2B';
  112.     public const DROPSHIPPING_PACK_INDEXED_BY_ID = [
  113.         self::PACK_PRO => 'PRO',
  114.         self::PACK_BUSINESS => 'BUSINESS',
  115.         self::PACK_PREMIUM => 'PREMIUM',
  116.         self::PACK_B2B => 'B2B',
  117.         self::PACK_DROPSHIP => 'DROPSHIP',
  118.         self::PACK_ENTERPRISE => 'ENTERPRISE',
  119.         self::PACK_ECOMMERCE => 'ECOMMERCE',
  120.         self::PACK_MARKETPLACES => 'MARKETPLACES',
  121.     ];
  122.     public const AVAILABLE_WHOLESALE_PACKS_IDS = [
  123.         self::PACK_ECOMMERCE,
  124.         self::PACK_MARKETPLACES,
  125.     ];
  126.     /**
  127.      * @var int
  128.      *
  129.      * @ORM\Id
  130.      *
  131.      * @ORM\Column(type="integer", name="id_pack")
  132.      */
  133.     private $id;
  134.     /**
  135.      * @var Language
  136.      *
  137.      * @ORM\Id()
  138.      *
  139.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language", inversedBy="packs")
  140.      *
  141.      * @ORM\JoinColumn(referencedColumnName="id_lang", name="id_lang")
  142.      */
  143.     private $language;
  144.     /**
  145.      * @var string
  146.      *
  147.      * @ORM\Column(type="string", length=32)
  148.      */
  149.     private $name;
  150.     /**
  151.      * @return int
  152.      */
  153.     public function getId(): int
  154.     {
  155.         return $this->id;
  156.     }
  157.     /**
  158.      * @param int $id
  159.      *
  160.      * @return Pack
  161.      */
  162.     public function setId(int $id): self
  163.     {
  164.         $this->id $id;
  165.         return $this;
  166.     }
  167.     /**
  168.      * @return Language
  169.      */
  170.     public function getLanguage(): Language
  171.     {
  172.         return $this->language;
  173.     }
  174.     /**
  175.      * @param $language Language
  176.      *
  177.      * @return Pack
  178.      */
  179.     public function setLanguage(Language $language): Pack
  180.     {
  181.         $this->language $language;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @return string
  186.      */
  187.     public function getName(): string
  188.     {
  189.         return $this->name;
  190.     }
  191.     /**
  192.      * @param string $name
  193.      *
  194.      * @return Pack
  195.      */
  196.     public function setName(string $name): self
  197.     {
  198.         $this->name $name;
  199.         return $this;
  200.     }
  201. }