<?php
namespace App\Database\Domain\Entity\User;
use App\Database\Domain\Entity\AbstractEntity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class UserStripeMember extends AbstractEntity
{
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $externalId;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $subscriptionId;
/**
* @ORM\OneToMany(targetEntity="App\Database\Domain\Entity\Referral\StripeDiscount", mappedBy="stripeMember", fetch="EXTRA_LAZY")
*
* @var Collection<int, \App\Database\Domain\Entity\Referral\StripeDiscount>
*/
private Collection $discounts;
public function __construct(string $id, ?string $externalId = null)
{
$this->id = $id;
$this->externalId = $externalId;
$this->discounts = new ArrayCollection();
}
public function getExternalId(): ?string
{
return $this->externalId;
}
public function setExternalId(?string $externalId): self
{
$this->externalId = $externalId;
return $this;
}
public function getSubscriptionId(): ?string
{
return $this->subscriptionId;
}
public function setSubscriptionId(?string $subscriptionId): self
{
$this->subscriptionId = $subscriptionId;
return $this;
}
public function getDiscounts()
{
return $this->discounts;
}
}