src/Entity/ProductRecurringOneShot.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\ProductRecurringOneShotRepository")
  6.  *
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class ProductRecurringOneShot
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      *
  14.      * @ORM\GeneratedValue()
  15.      *
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity="App\Entity\StripePrice", inversedBy="products_recurring")
  21.      */
  22.     private $one_shot_product;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\StripePrice", inversedBy="products_one_shot")
  25.      */
  26.     private $recurring_product;
  27.     /**
  28.      * @ORM\Column(type="datetime", nullable=false)
  29.      */
  30.     private $created_at;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     /**
  36.      * @return mixed
  37.      */
  38.     public function getOneShotProduct()
  39.     {
  40.         return $this->one_shot_product;
  41.     }
  42.     /**
  43.      * @param mixed $one_shot_product
  44.      */
  45.     public function setOneShotProduct($one_shot_product): void
  46.     {
  47.         $this->one_shot_product $one_shot_product;
  48.     }
  49.     /**
  50.      * @return mixed
  51.      */
  52.     public function getRecurringProduct()
  53.     {
  54.         return $this->recurring_product;
  55.     }
  56.     /**
  57.      * @param mixed $recurring_product
  58.      */
  59.     public function setRecurringProduct($recurring_product): void
  60.     {
  61.         $this->recurring_product $recurring_product;
  62.     }
  63.     /**
  64.      * @ORM\PrePersist
  65.      */
  66.     public function setCreatedAtValue()
  67.     {
  68.         $this->setCreatedAt(new \DateTime());
  69.     }
  70.     /**
  71.      * @return null
  72.      */
  73.     public function getCreatedAt()
  74.     {
  75.         return $this->created_at;
  76.     }
  77.     /**
  78.      * @param null $created_at
  79.      */
  80.     public function setCreatedAt($created_at): void
  81.     {
  82.         $this->created_at $created_at;
  83.     }
  84. }