app/Plugin/payjp4/Entity/Payjp/Plan.php line 25

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\ProductClass;
  15. /**
  16.  * Class Plan
  17.  * @package Plugin\payjp4\Entity\Payjp
  18.  *
  19.  * @ORM\Table(name="plg_payjp_plan")
  20.  * @ORM\Entity(repositoryClass="Plugin\payjp4\Repository\Payjp\PlanRepository")
  21.  */
  22. class Plan extends \Eccube\Entity\AbstractEntity
  23. {
  24.     /**
  25.     * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  26.     * @ORM\Id()
  27.     * @ORM\GeneratedValue(strategy="IDENTITY")
  28.     */
  29.     private $id;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $plan_id;
  34.     /**
  35.      * @ORM\Column(type="integer")
  36.      */
  37.     private $amount;
  38.     /**
  39.      * @ORM\Column(type="string", length=255)
  40.      */
  41.     private $object 'plan';
  42.     /**
  43.      * @ORM\Column(type="boolean")
  44.      */
  45.     private $livemode false;
  46.     /**
  47.      * @ORM\Column(type="datetimetz")
  48.      */
  49.     private $created;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $currency 'jpy';
  54.     /**
  55.      * @ORM\Column(type="string", length=255)
  56.      */
  57.     private $charge_interval;
  58.     /**
  59.      * @ORM\Column(type="string", length=255)
  60.      */
  61.     private $name;
  62.     /**
  63.      * @ORM\Column(type="integer")
  64.      */
  65.     private $trial_days 0;
  66.     /**
  67.      * @ORM\Column(type="integer", nullable=true)
  68.      */
  69.     private $billing_day;
  70.     /**
  71.      * @ORM\OneToOne(targetEntity="Eccube\Entity\ProductClass", mappedBy="Plan")
  72.      */
  73.     private $ProductClass;
  74.     public function getId(): ?int
  75.     {
  76.         return $this->id;
  77.     }
  78.     public function getPlanId(): ?string
  79.     {
  80.         return $this->plan_id;
  81.     }
  82.     public function setPlanId(string $plan_id): self
  83.     {
  84.         $this->plan_id $plan_id;
  85.         return $this;
  86.     }
  87.     public function getAmount(): ?int
  88.     {
  89.         return $this->amount;
  90.     }
  91.     public function setAmount(int $amount): self
  92.     {
  93.         $this->amount $amount;
  94.         return $this;
  95.     }
  96.     public function getObject(): ?string
  97.     {
  98.         return $this->object;
  99.     }
  100.     public function setObject(string $object): self
  101.     {
  102.         $this->object $object;
  103.         return $this;
  104.     }
  105.     public function getLivemode(): ?bool
  106.     {
  107.         return $this->livemode;
  108.     }
  109.     public function setLivemode(bool $livemode): self
  110.     {
  111.         $this->livemode $livemode;
  112.         return $this;
  113.     }
  114.     public function getCreated(): ?\DateTime
  115.     {
  116.         return $this->created;
  117.     }
  118.     public function setCreated(\DateTime $created): self
  119.     {
  120.         $this->created $created;
  121.         return $this;
  122.     }
  123.     public function getCurrency(): ?string
  124.     {
  125.         return $this->currency;
  126.     }
  127.     public function setCurrency(string $currency): self
  128.     {
  129.         $this->currency $currency;
  130.         return $this;
  131.     }
  132.     public function getChargeInterval(): ?string
  133.     {
  134.         return $this->charge_interval;
  135.     }
  136.     public function setChargeInterval(string $charge_interval): self
  137.     {
  138.         $this->charge_interval $charge_interval;
  139.         return $this;
  140.     }
  141.     public function getName(): ?string
  142.     {
  143.         return $this->name;
  144.     }
  145.     public function setName(string $name): self
  146.     {
  147.         $this->name $name;
  148.         return $this;
  149.     }
  150.     public function getTrialDays(): ?int
  151.     {
  152.         return $this->trial_days;
  153.     }
  154.     public function setTrialDays(int $trial_days): self
  155.     {
  156.         $this->trial_days $trial_days;
  157.         return $this;
  158.     }
  159.     public function getBillingDay(): ?int
  160.     {
  161.         return $this->billing_day;
  162.     }
  163.     public function setBillingDay(?int $billing_day): self
  164.     {
  165.         $this->billing_day $billing_day;
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return ProductClass|null
  170.      */
  171.     public function getProductClass(): ?ProductClass
  172.     {
  173.         return $this->ProductClass;
  174.     }
  175.     /**
  176.      * @param ProductClass $productClass
  177.      * @return $this
  178.      */
  179.     public function setProductClass(ProductClass $productClass): self
  180.     {
  181.         $this->ProductClass $productClass;
  182.         return $this;
  183.     }
  184. }