src/Entity/Facture.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\isSlugger;
  4. use App\Entity\Trait\isTimestamstable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\FactureRepository;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. /**
  9.  * @ORM\Entity(repositoryClass=FactureRepository::class)
  10.  * @UniqueEntity("slug")
  11.  */
  12. class Facture
  13. {
  14.     use isTimestamstable;
  15.     use isSlugger;
  16.     public const TYPE_ABONNEMENT 'abonnement';
  17.     public const TYPE_COLLECT 'collect';
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private ?int $id null;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Abonnement::class, inversedBy="invoices")
  26.      */
  27.     private $abonnement;
  28.     /**
  29.      * @ORM\OneToOne(targetEntity=Collect::class, inversedBy="invoice")
  30.      */
  31.     private $collect;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      */
  35.     private $stripeId;
  36.     /**
  37.      * @ORM\Column(type="string", length=255)
  38.      */
  39.     private $hostedUrl;
  40.     /**
  41.      * @ORM\Column(type="string", length=255)
  42.      */
  43.     private $downloadUrl;
  44.     /**
  45.      * @ORM\Column(type="string", length=255)
  46.      */
  47.     private $type;
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getAbonnement(): ?Abonnement
  53.     {
  54.         return $this->abonnement;
  55.     }
  56.     public function setAbonnement(?Abonnement $abonnement): void
  57.     {
  58.         $this->abonnement $abonnement;
  59.     }
  60.     public function getCollect(): Collect
  61.     {
  62.         return $this->collect;
  63.     }
  64.     public function setCollect(?Collect $collect): void
  65.     {
  66.         $this->collect $collect;
  67.     }
  68.     public function getStripeId(): string
  69.     {
  70.         return $this->stripeId;
  71.     }
  72.     public function setStripeId($stripeId): void
  73.     {
  74.         $this->stripeId $stripeId;
  75.     }
  76.     public function getHostedUrl()
  77.     {
  78.         return $this->hostedUrl;
  79.     }
  80.     public function setHostedUrl($hostedUrl): void
  81.     {
  82.         $this->hostedUrl $hostedUrl;
  83.     }
  84.     public function getDownloadUrl()
  85.     {
  86.         return $this->downloadUrl;
  87.     }
  88.     public function setDownloadUrl($downloadUrl): void
  89.     {
  90.         $this->downloadUrl $downloadUrl;
  91.     }
  92.     public function getType()
  93.     {
  94.         return $this->type;
  95.     }
  96.     public function setType($type): void
  97.     {
  98.         $this->type $type;
  99.     }
  100. }