src/Entity/Invoice.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InvoiceRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassInvoiceRepository::class)]
  7. class Invoice
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255nullabletrue)]
  14.     private ?string $stripeId null;
  15.     #[ORM\Column(nullabletrue)]
  16.     private ?int $amountPaid null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $number null;
  19.     #[ORM\ManyToOne(inversedBy'invoices')]
  20.     private ?Subscription $subscription null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $hostedInvoiceUrl null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  24.     private ?\DateTimeInterface $createdAt null;
  25.     public function __construct()
  26.     {
  27.         $this->createdAt = new \DateTime();   
  28.     }
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getStripeId(): ?string
  34.     {
  35.         return $this->stripeId;
  36.     }
  37.     public function setStripeId(?string $stripeId): self
  38.     {
  39.         $this->stripeId $stripeId;
  40.         return $this;
  41.     }
  42.     public function getAmountPaid(): ?int
  43.     {
  44.         return $this->amountPaid;
  45.     }
  46.     public function setAmountPaid(?int $amountPaid): self
  47.     {
  48.         $this->amountPaid $amountPaid;
  49.         return $this;
  50.     }
  51.     public function getNumber(): ?string
  52.     {
  53.         return $this->number;
  54.     }
  55.     public function setNumber(?string $number): self
  56.     {
  57.         $this->number $number;
  58.         return $this;
  59.     }
  60.     public function getSubscription(): ?Subscription
  61.     {
  62.         return $this->subscription;
  63.     }
  64.     public function setSubscription(?Subscription $subscription): self
  65.     {
  66.         $this->subscription $subscription;
  67.         return $this;
  68.     }
  69.     public function getHostedInvoiceUrl(): ?string
  70.     {
  71.         return $this->hostedInvoiceUrl;
  72.     }
  73.     public function setHostedInvoiceUrl(?string $hostedInvoiceUrl): self
  74.     {
  75.         $this->hostedInvoiceUrl $hostedInvoiceUrl;
  76.         return $this;
  77.     }
  78.     public function getCreatedAt(): ?\DateTimeInterface
  79.     {
  80.         return $this->createdAt;
  81.     }
  82.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  83.     {
  84.         $this->createdAt $createdAt;
  85.         return $this;
  86.     }
  87. }