src/Entity/System/Service.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Toni Peral <toniperal.a4b@gmail.com>
  5.  * Date: 24/11/20
  6.  * Time: 13:04
  7.  */
  8. namespace App\Entity\System;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @ORM\Table(name="ps_service")
  13.  *
  14.  * @ORM\Entity(repositoryClass="App\Repository\System\ServiceRepository")
  15.  */
  16. class Service
  17. {
  18.     public const FTP 1;
  19.     public const SYNCHRONIZED_SHOP 2;
  20.     public const BLOCK_STOCK 3;
  21.     public const WAREHOUSE_PICKUP 4;
  22.     public const API 5;
  23.     public const DROPSHIPPING 6;
  24.     public const PACK_AND_COLLECT 7;
  25.     public const MIP 8;
  26.     public const MIP_PRESTASHOP_360 9;
  27.     public const MIP_SHOPIFY_360 10;
  28.     public const MIP_PRESTASHOP 11;
  29.     public const MIP_SHOPIFY 12;
  30.     public const MIP_AMAZON 13;
  31.     public const MIP_EBAY 14;
  32.     public const MIP_GOOGLE_SHOPPING 15;
  33.     public const CREDIT 16;
  34.     public const DOWNLOAD_PRODUCT_LIST 17;
  35.     public const MIP_ALIEXPRESS 18;
  36.     public const MIP_CDISCOUNT 19;
  37.     public const MIP_WOOCOMMERCE 20;
  38.     public const MIP_MAGENTO 21;
  39.     public const MIP_RAKUTEN 22;
  40.     public const MIP_CARREFOUR 23;
  41.     public const MIP_FNAC 24;
  42.     public const MIP_GROUPON 25;
  43.     public const MIP_EPRICE 26;
  44.     public const MIP_FACEBOOK 27;
  45.     public const MIP_DARTY 28;
  46.     public const MIP_RUE_DU_COMMERCE 29;
  47.     public const MIP_CONFORAMA 30;
  48.     public const MIP_VIDAXL 31;
  49.     public const MIP_REAL 32;
  50.     public const MIP_BOLCOM 33;
  51.     public const MIP_VENCA 34;
  52.     public const MIP_TRADEMAX 35;
  53.     public const MIP_SPRINTER 36;
  54.     public const MIP_PC_COMPONENTES 37;
  55.     public const MIP_5xMARKETPLACES 38;
  56.     public const MIP_ALLEGRO 39;
  57.     public const MIP_WORTEN 42;
  58.     public const FBA_ALLOWED 43;
  59.     public const MIP_MEDIAMARKT_ES 43;
  60.     public const MIP_LEROY_MERLIN 45;
  61.     public const MIP_WIX 46;
  62.     public const EXTRA_DISCOUNT 47;
  63.     public const ORDERS_BY_CSV 48;
  64.     public const MIP_CDON 49;
  65.     public const MIP_WISH 50;
  66.     public const MIP_CARREFOUR_FR 52;
  67.     public const MIP_ELECLERC 53;
  68.     public const MIP_PERFUMES_CLUB 54;
  69.     public const MIP_MIRAVIA 55;
  70.     public const MIP_MEDIAMARKT_DE 56;
  71.     public const SERVICE_API_TEXT 'API';
  72.     public const SHOPS_SERVICES_IDS = [self::MIP_PRESTASHOP_360self::MIP_SHOPIFY_360];
  73.     public const ADMIN_SERVICES_OPTION = [
  74.         'Bloqueo de stock' => self::BLOCK_STOCK,
  75.         'Recoger en almacén' => self::WAREHOUSE_PICKUP,
  76.         'Descarga de csv' => self::DOWNLOAD_PRODUCT_LIST,
  77.         'Dropshipping' => self::DROPSHIPPING,
  78.         'Crédito' => self::CREDIT,
  79.         'Permitir FBA' => self::FBA_ALLOWED,
  80.         'Extra discount' => self::EXTRA_DISCOUNT,
  81.     ];
  82.     /**
  83.      * @ORM\Id
  84.      *
  85.      * @ORM\GeneratedValue(strategy="AUTO")
  86.      *
  87.      * @ORM\Column(name="id_service", type="integer")
  88.      */
  89.     private $id;
  90.     /**
  91.      * @var string
  92.      *
  93.      * @ORM\Column(type="string", length=32)
  94.      */
  95.     private $name;
  96.     /**
  97.      * @var string|null
  98.      *
  99.      * @ORM\Column(type="string", length=32, nullable=true)
  100.      */
  101.     private $key;
  102.     /**
  103.      * @var bool
  104.      *
  105.      * @ORM\Column(type="boolean", columnDefinition="tinyint(4)")
  106.      */
  107.     private $unique;
  108.     /**
  109.      * @var ServiceCustomer
  110.      *
  111.      * @ORM\OneToMany(targetEntity="App\Entity\System\ServiceCustomer", mappedBy="service", cascade={"persist"})
  112.      */
  113.     private $serviceCustomer;
  114.     public function __construct()
  115.     {
  116.         $this->serviceCustomer = new ArrayCollection();
  117.     }
  118.     /**
  119.      * @return mixed
  120.      */
  121.     public function getId()
  122.     {
  123.         return $this->id;
  124.     }
  125.     /**
  126.      * @param mixed $id
  127.      *
  128.      * @return Service
  129.      */
  130.     public function setId($id): Service
  131.     {
  132.         $this->id $id;
  133.         return $this;
  134.     }
  135.     /**
  136.      * @return string
  137.      */
  138.     public function getName(): string
  139.     {
  140.         return $this->name;
  141.     }
  142.     /**
  143.      * @param string $name
  144.      *
  145.      * @return Service
  146.      */
  147.     public function setName(string $name): Service
  148.     {
  149.         $this->name $name;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return string|null
  154.      */
  155.     public function getKey(): ?string
  156.     {
  157.         return $this->key;
  158.     }
  159.     /**
  160.      * @param string|null $key
  161.      *
  162.      * @return Service
  163.      */
  164.     public function setKey(?string $key): Service
  165.     {
  166.         $this->key $key;
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return bool
  171.      */
  172.     public function isUnique(): bool
  173.     {
  174.         return $this->unique;
  175.     }
  176.     /**
  177.      * @param bool $unique
  178.      *
  179.      * @return Service
  180.      */
  181.     public function setUnique(bool $unique): Service
  182.     {
  183.         $this->unique $unique;
  184.         return $this;
  185.     }
  186.     /**
  187.      * @return ServiceCustomer
  188.      */
  189.     public function getServiceCustomer(): ServiceCustomer
  190.     {
  191.         return $this->serviceCustomer;
  192.     }
  193.     /**
  194.      * @param ServiceCustomer $serviceCustomer
  195.      *
  196.      * @return Service
  197.      */
  198.     public function setServiceCustomer(ServiceCustomer $serviceCustomer): Service
  199.     {
  200.         $this->serviceCustomer $serviceCustomer;
  201.         return $this;
  202.     }
  203. }