src/Entity/System/ServiceCustomerParameter.php line 19

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