app/Plugin/payjp4/Entity/Payjp/Subscription.php line 26

Open in your IDE?
  1. <?php
  2. /**
  3.  * This file is part of payjp4
  4.  *
  5.  * Copyright(c) Akira Kurozumi <info@a-zumi.net>
  6.  *
  7.  *  https://a-zumi.net
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Plugin\payjp4\Entity\Payjp;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Eccube\Entity\Customer;
  15. use Eccube\Entity\OrderItem;
  16. /**
  17.  * Class Subscription
  18.  * @package Plugin\payjp4\Entity\Payjp
  19.  *
  20.  * @ORM\Table(name="plg_payjp_subscription")
  21.  * @ORM\Entity(repositoryClass="Plugin\payjp4\Repository\Payjp\SubscriptionRepository")
  22.  */
  23. class Subscription extends \Eccube\Entity\AbstractEntity
  24. {
  25.     /**
  26.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  27.      * @ORM\Id()
  28.      * @ORM\GeneratedValue(strategy="IDENTITY")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(type="string", length=255)
  35.      */
  36.     private $payjp_id;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="Eccube\Entity\Customer", inversedBy="Subscriptions")
  39.      * @ORM\JoinColumn(nullable=false)
  40.      */
  41.     private $Customer;
  42.     /**
  43.      * @ORM\OneToOne(targetEntity="Eccube\Entity\OrderItem", mappedBy="Subscription")
  44.      */
  45.     private $OrderItem;
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     /**
  51.      * @return string
  52.      */
  53.     public function getPayjpId(): string
  54.     {
  55.         return $this->payjp_id;
  56.     }
  57.     /**
  58.      * @param string $payjp_id
  59.      * @return $this
  60.      */
  61.     public function setPayjpId(string $payjp_id): self
  62.     {
  63.         $this->payjp_id $payjp_id;
  64.         return $this;
  65.     }
  66.     /**
  67.      * @return Customer
  68.      */
  69.     public function getCustomer(): Customer
  70.     {
  71.         return $this->Customer;
  72.     }
  73.     /**
  74.      * @param Customer $Customer
  75.      * @return $this
  76.      */
  77.     public function setCustomer(Customer $Customer): self
  78.     {
  79.         $this->Customer $Customer;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return OrderItem|null
  84.      */
  85.     public function getOrderItem(): ?OrderItem
  86.     {
  87.         return $this->OrderItem;
  88.     }
  89.     /**
  90.      * @param OrderItem $orderItem
  91.      * @return $this
  92.      */
  93.     public function setOrderItem(OrderItem $orderItem): self
  94.     {
  95.         $this->OrderItem $orderItem;
  96.         return $this;
  97.     }
  98. }