<?phpnamespace App\Entity;use App\Entity\Trait\isSlugger;use App\Entity\Trait\isTimestamstable;use Doctrine\ORM\Mapping as ORM;use App\Repository\FactureRepository;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;/** * @ORM\Entity(repositoryClass=FactureRepository::class) * @UniqueEntity("slug") */class Facture{ use isTimestamstable; use isSlugger; public const TYPE_ABONNEMENT = 'abonnement'; public const TYPE_COLLECT = 'collect'; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private ?int $id = null; /** * @ORM\ManyToOne(targetEntity=Abonnement::class, inversedBy="invoices") */ private $abonnement; /** * @ORM\OneToOne(targetEntity=Collect::class, inversedBy="invoice") */ private $collect; /** * @ORM\Column(type="string", length=255) */ private $stripeId; /** * @ORM\Column(type="string", length=255) */ private $hostedUrl; /** * @ORM\Column(type="string", length=255) */ private $downloadUrl; /** * @ORM\Column(type="string", length=255) */ private $type; public function getId(): ?int { return $this->id; } public function getAbonnement(): ?Abonnement { return $this->abonnement; } public function setAbonnement(?Abonnement $abonnement): void { $this->abonnement = $abonnement; } public function getCollect(): Collect { return $this->collect; } public function setCollect(?Collect $collect): void { $this->collect = $collect; } public function getStripeId(): string { return $this->stripeId; } public function setStripeId($stripeId): void { $this->stripeId = $stripeId; } public function getHostedUrl() { return $this->hostedUrl; } public function setHostedUrl($hostedUrl): void { $this->hostedUrl = $hostedUrl; } public function getDownloadUrl() { return $this->downloadUrl; } public function setDownloadUrl($downloadUrl): void { $this->downloadUrl = $downloadUrl; } public function getType() { return $this->type; } public function setType($type): void { $this->type = $type; }}