src/Entity/System/CustomerApi.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * CustomerApi
  6.  *
  7.  * @ORM\Table(
  8.  *     name="ps_customer_api_key",
  9.  *     indexes={
  10.  *
  11.  *         @ORM\Index(name="IDX_api_production", columns={"api_sandbox"}),
  12.  *         @ORM\Index(name="IDX_api_sandbox", columns={"api_production"})
  13.  *     }
  14.  * )
  15.  *
  16.  * @ORM\Entity(repositoryClass="App\Repository\System\CustomerApiRepository")
  17.  */
  18. class CustomerApi
  19. {
  20.     /**
  21.      * @ORM\Id()
  22.      *
  23.      * @ORM\GeneratedValue()
  24.      *
  25.      * @ORM\Column(type="integer", name="id_api")
  26.      */
  27.     private $id;
  28.     /**
  29.      * @var Customer
  30.      *
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="customerApi")
  32.      *
  33.      * @ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer")
  34.      */
  35.     private $customer;
  36.     /**
  37.      * @var string|null
  38.      *
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $apiSandbox;
  42.     /**
  43.      * @var string|null
  44.      *
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $apiProduction;
  48.     /**
  49.      * @return mixed
  50.      */
  51.     public function getId()
  52.     {
  53.         return $this->id;
  54.     }
  55.     /**
  56.      * @param mixed $id
  57.      *
  58.      * @return CustomerApi
  59.      */
  60.     public function setId($id): CustomerApi
  61.     {
  62.         $this->id $id;
  63.         return $this;
  64.     }
  65.     /**
  66.      * @return Customer
  67.      */
  68.     public function getCustomer(): Customer
  69.     {
  70.         return $this->customer;
  71.     }
  72.     /**
  73.      * @param Customer $customer
  74.      *
  75.      * @return CustomerApi
  76.      */
  77.     public function setCustomer(Customer $customer): CustomerApi
  78.     {
  79.         $this->customer $customer;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return string|null
  84.      */
  85.     public function getApiSandbox(): ?string
  86.     {
  87.         return $this->apiSandbox;
  88.     }
  89.     /**
  90.      * @param string|null $apiSandbox
  91.      *
  92.      * @return CustomerApi
  93.      */
  94.     public function setApiSandbox(?string $apiSandbox): CustomerApi
  95.     {
  96.         $this->apiSandbox $apiSandbox;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return string|null
  101.      */
  102.     public function getApiProduction(): ?string
  103.     {
  104.         return $this->apiProduction;
  105.     }
  106.     /**
  107.      * @param string|null $apiProduction
  108.      *
  109.      * @return CustomerApi
  110.      */
  111.     public function setApiProduction(?string $apiProduction): CustomerApi
  112.     {
  113.         $this->apiProduction $apiProduction;
  114.         return $this;
  115.     }
  116. }