src/Entity/AvocadostoreToShopwareConnection.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AvocadostoreToShopwareConnectionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AvocadostoreToShopwareConnectionRepository::class)
  9.  */
  10. class AvocadostoreToShopwareConnection
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $shopwareApiVersion;
  22.     /**
  23.      * @ORM\Column(type="string", length=510)
  24.      */
  25.     private $shopwareBaseUrl;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $shopwareAdminApiUsername;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $shopwareAdminApiPassword;
  34.     /**
  35.      * @ORM\Column(type="string", length=1024)
  36.      */
  37.     private $shopwareAdminApiAccessToken;
  38.     /**
  39.      * @ORM\Column(type="string", length=1024)
  40.      */
  41.     private $shopwareAdminApiRefreshToken;
  42.     /**
  43.      * @ORM\Column(type="datetime", nullable=true)
  44.      */
  45.     private $shopwareAdminApiExpireTime;
  46.     /**
  47.      * @ORM\OneToMany(targetEntity=AvocadostoreOrder::class, mappedBy="connection")
  48.      */
  49.     private $orders;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $shopwareSalesChannelId;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $shopwareCustomerId;
  58.     /**
  59.      * @ORM\Column(type="string", length=255)
  60.      */
  61.     private $shopwarePaymentId;
  62.     /**
  63.      * @ORM\Column(type="string", length=255)
  64.      */
  65.     private $shopwareSalesChannelAccessKey;
  66.     public function __construct()
  67.     {
  68.         $this->orders = new ArrayCollection();
  69.     }
  70.     public function getId(): ?int
  71.     {
  72.         return $this->id;
  73.     }
  74.     public function getShopwareApiVersion(): ?int
  75.     {
  76.         return $this->shopwareApiVersion;
  77.     }
  78.     public function setShopwareApiVersion(int $shopwareApiVersion): self
  79.     {
  80.         $this->shopwareApiVersion $shopwareApiVersion;
  81.         return $this;
  82.     }
  83.     public function getShopwareBaseUrl(): ?string
  84.     {
  85.         return $this->shopwareBaseUrl;
  86.     }
  87.     public function setShopwareBaseUrl(string $shopwareBaseUrl): self
  88.     {
  89.         $this->shopwareBaseUrl $shopwareBaseUrl;
  90.         return $this;
  91.     }
  92.     public function getShopwareAdminApiUsername(): ?string
  93.     {
  94.         return $this->shopwareAdminApiUsername;
  95.     }
  96.     public function setShopwareAdminApiUsername(string $shopwareAdminApiUsername): self
  97.     {
  98.         $this->shopwareAdminApiUsername $shopwareAdminApiUsername;
  99.         return $this;
  100.     }
  101.     public function getShopwareAdminApiPassword(): ?string
  102.     {
  103.         return $this->shopwareAdminApiPassword;
  104.     }
  105.     public function setShopwareAdminApiPassword(string $shopwareAdminApiPassword): self
  106.     {
  107.         $this->shopwareAdminApiPassword $shopwareAdminApiPassword;
  108.         return $this;
  109.     }
  110.     public function getShopwareAdminApiAccessToken(): ?string
  111.     {
  112.         return $this->shopwareAdminApiAccessToken;
  113.     }
  114.     public function setShopwareAdminApiAccessToken(string $shopwareAdminApiAccessToken): self
  115.     {
  116.         $this->shopwareAdminApiAccessToken $shopwareAdminApiAccessToken;
  117.         return $this;
  118.     }
  119.     public function getShopwareAdminApiRefreshToken(): ?string
  120.     {
  121.         return $this->shopwareAdminApiRefreshToken;
  122.     }
  123.     public function setShopwareAdminApiRefreshToken(string $shopwareAdminApiRefreshToken): self
  124.     {
  125.         $this->shopwareAdminApiRefreshToken $shopwareAdminApiRefreshToken;
  126.         return $this;
  127.     }
  128.     public function getShopwareAdminApiExpireTime(): ?\DateTimeInterface
  129.     {
  130.         return $this->shopwareAdminApiExpireTime;
  131.     }
  132.     public function setShopwareAdminApiExpireTime(?\DateTimeInterface $shopwareAdminApiExpireTime): self
  133.     {
  134.         $this->shopwareAdminApiExpireTime $shopwareAdminApiExpireTime;
  135.         return $this;
  136.     }
  137.     /**
  138.      * @return Collection|AvocadostoreOrder[]
  139.      */
  140.     public function getOrders(): Collection
  141.     {
  142.         return $this->orders;
  143.     }
  144.     public function addOrder(AvocadostoreOrder $order): self
  145.     {
  146.         if (!$this->orders->contains($order)) {
  147.             $this->orders[] = $order;
  148.             $order->setConnection($this);
  149.         }
  150.         return $this;
  151.     }
  152.     public function removeOrder(AvocadostoreOrder $order): self
  153.     {
  154.         if ($this->orders->contains($order)) {
  155.             $this->orders->removeElement($order);
  156.             // set the owning side to null (unless already changed)
  157.             if ($order->getConnection() === $this) {
  158.                 $order->setConnection(null);
  159.             }
  160.         }
  161.         return $this;
  162.     }
  163.     public function getShopwareSalesChannelId(): ?string
  164.     {
  165.         return $this->shopwareSalesChannelId;
  166.     }
  167.     public function setShopwareSalesChannelId(string $shopwareSalesChannelId): self
  168.     {
  169.         $this->shopwareSalesChannelId $shopwareSalesChannelId;
  170.         return $this;
  171.     }
  172.     public function getShopwareCustomerId(): ?string
  173.     {
  174.         return $this->shopwareCustomerId;
  175.     }
  176.     public function setShopwareCustomerId(?string $shopwareCustomerId): self
  177.     {
  178.         $this->shopwareCustomerId $shopwareCustomerId;
  179.         return $this;
  180.     }
  181.     public function getShopwarePaymentId(): ?string
  182.     {
  183.         return $this->shopwarePaymentId;
  184.     }
  185.     public function setShopwarePaymentId(string $shopwarePaymentId): self
  186.     {
  187.         $this->shopwarePaymentId $shopwarePaymentId;
  188.         return $this;
  189.     }
  190.     public function getShopwareSalesChannelAccessKey(): ?string
  191.     {
  192.         return $this->shopwareSalesChannelAccessKey;
  193.     }
  194.     public function setShopwareSalesChannelAccessKey(string $shopwareSalesChannelAccessKey): self
  195.     {
  196.         $this->shopwareSalesChannelAccessKey $shopwareSalesChannelAccessKey;
  197.         return $this;
  198.     }
  199. }