src/Entity/System/ServiceCustomerParameter.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Toni Peral <[email protected]>
  5.  * Date: 24/11/20
  6.  * Time: 13:54
  7.  */
  8. namespace App\Entity\System;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Table(name="ps_service_customer_parameter")
  12.  *
  13.  * @ORM\Entity(repositoryClass="App\Repository\System\ServiceCustomerParameterRepository")
  14.  */
  15. class ServiceCustomerParameter
  16. {
  17.     public const KEY_QUANTITY_VALUE 'QUANTITY';
  18.     public const KEY_COST_VALUE 'COST';
  19.     public const KEY_MIP_USER_ID_VALUE 'MIP_USER_ID';
  20.     public const KEY_SHOP_ID_VALUE 'SHOP_ID';
  21.     public const KEY_CATALOG_ID_VALUE 'CATALOG_ID';
  22.     public const KEY_STATUS_VALUE 'STATUS';
  23.     public const COMMISSION_PERCENTAGE 'COMMISSION_PERCENTAGE';
  24.     public const COMMISSION_QUANTITY 'COMMISSION_QUANTITY';
  25.     public const DEFAULT_SERVICE_PRODUCT_QUANTITY_INDEXED_BY_PRODUCT_ID = [
  26.         ServiceProduct::PRESTASHOP_CONECTOR_ID => 2,
  27.         ServiceProduct::SHOP_SHOPIFY => 2,
  28.         ServiceProduct::RAKUTEN_SERVICE_ID => 1,
  29.         ServiceProduct::FNAC_SERVICE_ID => 3,
  30.         ServiceProduct::CARREFOUR_SERVICE_ID => 1,
  31.         ServiceProduct::CDISCOUNT_SERVICE_ID => 1,
  32.         ServiceProduct::DARTY_SERVICE_ID => 1,
  33.         ServiceProduct::EPRICE_SERVICE_ID => 1,
  34.         ServiceProduct::WOOCOMMERCE_CONECTOR_ID => 2,
  35.         ServiceProduct::REAL_SERVICE_ID => 5,
  36.         ServiceProduct::MAGENTO_CONECTOR_ID => 2,
  37.         ServiceProduct::PC_COMPONENTES_SERVICE_ID => 1,
  38.         ServiceProduct::MARKETPLACES_5x => 1,
  39.         ServiceProduct::ALLEGRO_SERVICE_ID => 1,
  40.         ServiceProduct::WORTEN_SERVICE_ID => 1,
  41.         ServiceProduct::LEROY_MERLIN_SERVICE_ID => 1,
  42.         ServiceProduct::WIX_SERVICE_ID => 2,
  43.         ServiceProduct::CDON_SERVICE_ID => 4,
  44.         ServiceProduct::WISH_SERVICE_ID => 1,
  45.         ServiceProduct::CARREFOUR_FR_SERVICE_ID => 1,
  46.         ServiceProduct::ELECLERC_SERVICE_ID => 1,
  47.         ServiceProduct::AMAZON_RAKUTEN_SERVICE_ID => 2,
  48.         ServiceProduct::AMAZON_WORTEN_SERVICE_ID => 2,
  49.         ServiceProduct::AMAZON_KAUFLAND_SERVICE_ID => 5,
  50.         ServiceProduct::AMAZON_FNAC_SERVICE_ID => 3,
  51.         ServiceProduct::AMAZON_EPRICE_SERVICE_ID => 2,
  52.         ServiceProduct::AMAZON_CDON_SERVICE_ID => 2,
  53.         ServiceProduct::EBAY_SERVICE_ID => 3,
  54.         ServiceProduct::AMAZON_SERVICE_ID => 2,
  55.         ServiceProduct::MEDIAMARKT_ES_SERVICE_ID => 1,
  56.         ServiceProduct::MEDIAMARKT_DE_SERVICE_ID => 1,
  57.     ];
  58.     public const VALUES_ALLOWED_ADMIN_EDIT_VALUES_INDEXED_BY_SERVICE_ID = [
  59.         Service::CREDIT => [
  60.             self::COMMISSION_PERCENTAGE,
  61.         ],
  62.     ];
  63.     /**
  64.      * @ORM\Id()
  65.      *
  66.      * @ORM\GeneratedValue(strategy="AUTO")
  67.      *
  68.      * @ORM\Column(name="id_service_customer_parameter", type="integer", length=11)
  69.      */
  70.     private $id;
  71.     /**
  72.      * @var ServiceCustomer
  73.      *
  74.      * @ORM\ManyToOne(targetEntity="App\Entity\System\ServiceCustomer", inversedBy="serviceCustomerParameters")
  75.      *
  76.      * @ORM\JoinColumn(name="id_service_customer", referencedColumnName="id_service_customer")
  77.      */
  78.     private ServiceCustomer $serviceCustomer;
  79.     /**
  80.      * @var string|null
  81.      *
  82.      * @ORM\Column(name="`key`", type="string", length=32, nullable=true)
  83.      */
  84.     private $key;
  85.     /**
  86.      * @var string|null
  87.      *
  88.      * @ORM\Column(name="`value`", type="string", length=32, nullable=true)
  89.      */
  90.     private $value;
  91.     /**
  92.      * @return mixed
  93.      */
  94.     public function getId()
  95.     {
  96.         return $this->id;
  97.     }
  98.     /**
  99.      * @param mixed $id
  100.      *
  101.      * @return ServiceCustomerParameter
  102.      */
  103.     public function setId($id): ServiceCustomerParameter
  104.     {
  105.         $this->id $id;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return ServiceCustomer
  110.      */
  111.     public function getServiceCustomer(): ServiceCustomer
  112.     {
  113.         return $this->serviceCustomer;
  114.     }
  115.     /**
  116.      * @param ServiceCustomer $serviceCustomer
  117.      *
  118.      * @return ServiceCustomerParameter
  119.      */
  120.     public function setServiceCustomer(ServiceCustomer $serviceCustomer): ServiceCustomerParameter
  121.     {
  122.         $this->serviceCustomer $serviceCustomer;
  123.         return $this;
  124.     }
  125.     /**
  126.      * @return string|null
  127.      */
  128.     public function getKey(): ?string
  129.     {
  130.         return $this->key;
  131.     }
  132.     /**
  133.      * @param string|null $key
  134.      *
  135.      * @return ServiceCustomerParameter
  136.      */
  137.     public function setKey(?string $key): ServiceCustomerParameter
  138.     {
  139.         $this->key $key;
  140.         return $this;
  141.     }
  142.     /**
  143.      * @return string|null
  144.      */
  145.     public function getValue(): ?string
  146.     {
  147.         return $this->value;
  148.     }
  149.     /**
  150.      * @param string|null $value
  151.      *
  152.      * @return ServiceCustomerParameter
  153.      */
  154.     public function setValue(?string $value): ServiceCustomerParameter
  155.     {
  156.         $this->value $value;
  157.         return $this;
  158.     }
  159. }