<?php
namespace App\Entity;
use App\Repository\PaiementRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PaiementRepository::class)
*/
class Paiement
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $value;
/**
* @ORM\Column(type="string", length=255)
*/
private $payinId;
/**
* @ORM\ManyToOne(targetEntity=Abonnement::class, inversedBy="paiements")
* @ORM\JoinColumn(nullable=false)
*/
private $abonnement;
/**
* @ORM\Column(type="datetime_immutable", options={"default"="CURRENT_TIMESTAMP"})
*/
private $createdAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $stripeInvoiceID;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $stripeAmountPaid;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $stripeNumber;
/**
* @ORM\Column(type="string", length=255)
*/
private $hostedInvoiceUrl;
/**
* @ORM\Column(type="boolean", options={"default": true})
*/
private $paid;
public function __construct()
{
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(?string $value): self
{
$this->value = $value;
return $this;
}
public function getPayinId(): ?string
{
return $this->payinId;
}
public function setPayinId(string $payinId): self
{
$this->payinId = $payinId;
return $this;
}
public function getAbonnement(): ?Abonnement
{
return $this->abonnement;
}
public function setAbonnement(?Abonnement $abonnement): self
{
$this->abonnement = $abonnement;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getStripeInvoiceID(): ?string
{
return $this->stripeInvoiceID;
}
public function setStripeInvoiceID(?string $stripeInvoiceID): self
{
$this->stripeInvoiceID = $stripeInvoiceID;
return $this;
}
public function getStripeAmountPaid(): ?int
{
return $this->stripeAmountPaid;
}
public function setStripeAmountPaid(?int $stripeAmountPaid): self
{
$this->stripeAmountPaid = $stripeAmountPaid;
return $this;
}
public function getStripeNumber(): ?string
{
return $this->stripeNumber;
}
public function setStripeNumber(?string $stripeNumber): self
{
$this->stripeNumber = $stripeNumber;
return $this;
}
public function getHostedInvoiceUrl(): ?string
{
return $this->hostedInvoiceUrl;
}
public function setHostedInvoiceUrl(string $hostedInvoiceUrl): self
{
$this->hostedInvoiceUrl = $hostedInvoiceUrl;
return $this;
}
public function isPaid(): ?bool
{
return $this->paid;
}
public function setPaid(bool $paid): self
{
$this->paid = $paid;
return $this;
}
}