<?php
namespace App\Entity;
use App\Entity\SuperClass\BaseEntity;
use App\Repository\SubscriptionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SubscriptionRepository::class)
*/
class Subscription extends BaseEntity
{
/**
* @ORM\Column(type="plan_duration_type")
*/
private $duration;
/**
* @ORM\Column(type="integer")
*/
private $amount;
/**
* @ORM\OneToOne(targetEntity=Product::class, cascade={"persist"})
*/
private $item;
/**
* @ORM\Column(type="boolean")
*/
private $active;
public function getDuration(): ?string
{
return $this->duration;
}
public function setDuration(string $duration): self
{
$this->duration = $duration;
return $this;
}
public function getAmount(): ?int
{
return $this->amount;
}
public function setAmount(int $amount): self
{
$this->amount = $amount;
return $this;
}
public function getItem(): ?Product
{
return $this->item;
}
public function setItem(?Product $item): self
{
$this->item = $item;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
}