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 VALUES_ALLOWED_ADMIN_EDIT_VALUES_INDEXED_BY_SERVICE_ID = [
  26.         Service::CREDIT => [
  27.             self::COMMISSION_PERCENTAGE,
  28.         ],
  29.     ];
  30.     /**
  31.      * @ORM\Id()
  32.      *
  33.      * @ORM\GeneratedValue(strategy="AUTO")
  34.      *
  35.      * @ORM\Column(name="id_service_customer_parameter", type="integer", length=11)
  36.      */
  37.     private $id;
  38.     /**
  39.      * @var ServiceCustomer
  40.      *
  41.      * @ORM\ManyToOne(targetEntity="App\Entity\System\ServiceCustomer", inversedBy="serviceCustomerParameters")
  42.      *
  43.      * @ORM\JoinColumn(name="id_service_customer", referencedColumnName="id_service_customer")
  44.      */
  45.     private ServiceCustomer $serviceCustomer;
  46.     /**
  47.      * @var string|null
  48.      *
  49.      * @ORM\Column(name="`key`", type="string", length=32, nullable=true)
  50.      */
  51.     private $key;
  52.     /**
  53.      * @var string|null
  54.      *
  55.      * @ORM\Column(name="`value`", type="string", length=32, nullable=true)
  56.      */
  57.     private $value;
  58.     /**
  59.      * @return mixed
  60.      */
  61.     public function getId()
  62.     {
  63.         return $this->id;
  64.     }
  65.     /**
  66.      * @param mixed $id
  67.      *
  68.      * @return ServiceCustomerParameter
  69.      */
  70.     public function setId($id): ServiceCustomerParameter
  71.     {
  72.         $this->id $id;
  73.         return $this;
  74.     }
  75.     /**
  76.      * @return ServiceCustomer
  77.      */
  78.     public function getServiceCustomer(): ServiceCustomer
  79.     {
  80.         return $this->serviceCustomer;
  81.     }
  82.     /**
  83.      * @param ServiceCustomer $serviceCustomer
  84.      *
  85.      * @return ServiceCustomerParameter
  86.      */
  87.     public function setServiceCustomer(ServiceCustomer $serviceCustomer): ServiceCustomerParameter
  88.     {
  89.         $this->serviceCustomer $serviceCustomer;
  90.         return $this;
  91.     }
  92.     /**
  93.      * @return string|null
  94.      */
  95.     public function getKey(): ?string
  96.     {
  97.         return $this->key;
  98.     }
  99.     /**
  100.      * @param string|null $key
  101.      *
  102.      * @return ServiceCustomerParameter
  103.      */
  104.     public function setKey(?string $key): ServiceCustomerParameter
  105.     {
  106.         $this->key $key;
  107.         return $this;
  108.     }
  109.     /**
  110.      * @return string|null
  111.      */
  112.     public function getValue(): ?string
  113.     {
  114.         return $this->value;
  115.     }
  116.     /**
  117.      * @param string|null $value
  118.      *
  119.      * @return ServiceCustomerParameter
  120.      */
  121.     public function setValue(?string $value): ServiceCustomerParameter
  122.     {
  123.         $this->value $value;
  124.         return $this;
  125.     }
  126. }