<?php
/**
* Created by PhpStorm.
* User: Toni Peral <[email protected]>
* Date: 24/11/20
* Time: 13:54
*/
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="ps_service_customer_parameter")
*
* @ORM\Entity(repositoryClass="App\Repository\System\ServiceCustomerParameterRepository")
*/
class ServiceCustomerParameter
{
public const KEY_QUANTITY_VALUE = 'QUANTITY';
public const KEY_COST_VALUE = 'COST';
public const KEY_MIP_USER_ID_VALUE = 'MIP_USER_ID';
public const KEY_SHOP_ID_VALUE = 'SHOP_ID';
public const KEY_CATALOG_ID_VALUE = 'CATALOG_ID';
public const KEY_STATUS_VALUE = 'STATUS';
public const COMMISSION_PERCENTAGE = 'COMMISSION_PERCENTAGE';
public const COMMISSION_QUANTITY = 'COMMISSION_QUANTITY';
public const VALUES_ALLOWED_ADMIN_EDIT_VALUES_INDEXED_BY_SERVICE_ID = [
Service::CREDIT => [
self::COMMISSION_PERCENTAGE,
],
];
/**
* @ORM\Id()
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(name="id_service_customer_parameter", type="integer", length=11)
*/
private $id;
/**
* @var ServiceCustomer
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\ServiceCustomer", inversedBy="serviceCustomerParameters")
*
* @ORM\JoinColumn(name="id_service_customer", referencedColumnName="id_service_customer")
*/
private ServiceCustomer $serviceCustomer;
/**
* @var string|null
*
* @ORM\Column(name="`key`", type="string", length=32, nullable=true)
*/
private $key;
/**
* @var string|null
*
* @ORM\Column(name="`value`", type="string", length=32, nullable=true)
*/
private $value;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*
* @return ServiceCustomerParameter
*/
public function setId($id): ServiceCustomerParameter
{
$this->id = $id;
return $this;
}
/**
* @return ServiceCustomer
*/
public function getServiceCustomer(): ServiceCustomer
{
return $this->serviceCustomer;
}
/**
* @param ServiceCustomer $serviceCustomer
*
* @return ServiceCustomerParameter
*/
public function setServiceCustomer(ServiceCustomer $serviceCustomer): ServiceCustomerParameter
{
$this->serviceCustomer = $serviceCustomer;
return $this;
}
/**
* @return string|null
*/
public function getKey(): ?string
{
return $this->key;
}
/**
* @param string|null $key
*
* @return ServiceCustomerParameter
*/
public function setKey(?string $key): ServiceCustomerParameter
{
$this->key = $key;
return $this;
}
/**
* @return string|null
*/
public function getValue(): ?string
{
return $this->value;
}
/**
* @param string|null $value
*
* @return ServiceCustomerParameter
*/
public function setValue(?string $value): ServiceCustomerParameter
{
$this->value = $value;
return $this;
}
}