<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProductRecurringOneShotRepository")
*
* @ORM\HasLifecycleCallbacks()
*/
class ProductRecurringOneShot
{
/**
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StripePrice", inversedBy="products_recurring")
*/
private $one_shot_product;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\StripePrice", inversedBy="products_one_shot")
*/
private $recurring_product;
/**
* @ORM\Column(type="datetime", nullable=false)
*/
private $created_at;
public function getId(): ?int
{
return $this->id;
}
/**
* @return mixed
*/
public function getOneShotProduct()
{
return $this->one_shot_product;
}
/**
* @param mixed $one_shot_product
*/
public function setOneShotProduct($one_shot_product): void
{
$this->one_shot_product = $one_shot_product;
}
/**
* @return mixed
*/
public function getRecurringProduct()
{
return $this->recurring_product;
}
/**
* @param mixed $recurring_product
*/
public function setRecurringProduct($recurring_product): void
{
$this->recurring_product = $recurring_product;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue()
{
$this->setCreatedAt(new \DateTime());
}
/**
* @return null
*/
public function getCreatedAt()
{
return $this->created_at;
}
/**
* @param null $created_at
*/
public function setCreatedAt($created_at): void
{
$this->created_at = $created_at;
}
}