src/Database/Domain/Entity/User/UserStripeMember.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Database\Domain\Entity\User;
  3. use App\Database\Domain\Entity\AbstractEntity;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity()
  9.  */
  10. class UserStripeMember extends AbstractEntity
  11. {
  12.     /**
  13.      * @ORM\Column(type="text", nullable=true)
  14.      */
  15.     private ?string $externalId;
  16.     /**
  17.      * @ORM\Column(type="text", nullable=true)
  18.      */
  19.     private ?string $subscriptionId;
  20.     /**
  21.      * @ORM\OneToMany(targetEntity="App\Database\Domain\Entity\Referral\StripeDiscount", mappedBy="stripeMember", fetch="EXTRA_LAZY")
  22.      *
  23.      * @var Collection<int, \App\Database\Domain\Entity\Referral\StripeDiscount>
  24.      */
  25.     private Collection $discounts;
  26.     public function __construct(string $id, ?string $externalId null)
  27.     {
  28.         $this->id $id;
  29.         $this->externalId $externalId;
  30.         $this->discounts = new ArrayCollection();
  31.     }
  32.     public function getExternalId(): ?string
  33.     {
  34.         return $this->externalId;
  35.     }
  36.     public function setExternalId(?string $externalId): self
  37.     {
  38.         $this->externalId $externalId;
  39.         return $this;
  40.     }
  41.     public function getSubscriptionId(): ?string
  42.     {
  43.         return $this->subscriptionId;
  44.     }
  45.     public function setSubscriptionId(?string $subscriptionId): self
  46.     {
  47.         $this->subscriptionId $subscriptionId;
  48.         return $this;
  49.     }
  50.     public function getDiscounts()
  51.     {
  52.         return $this->discounts;
  53.     }
  54. }