src/Entity/Invoice.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InvoiceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Entity(repositoryClass=InvoiceRepository::class)
  8.  */
  9. class Invoice
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="invoices")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $user;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Company::class)
  24.      * @ORM\JoinColumn(nullable=false)
  25.      */
  26.     private $company;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $num;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $stripePaymentId;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity=Workshop::class)
  37.      * @ORM\JoinColumn(nullable=false)
  38.      */
  39.     private $workshop;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=Event::class)
  42.      * @ORM\JoinColumn(nullable=true)
  43.      */
  44.     private $event;
  45.     /**
  46.      * @ORM\Column(type="float", nullable=true)
  47.      */
  48.     private $amountHt null;
  49.     /**
  50.      * @ORM\Column(type="float", nullable=true)
  51.      */
  52.     private $amountTtc null;
  53.     /**
  54.      * @ORM\Column(type="boolean")
  55.      */
  56.     private $paid false;
  57.     /**
  58.      * @ORM\Column(type="datetime_immutable")
  59.      * @Gedmo\Timestampable(on="create")
  60.      */
  61.     private $createdAt null;
  62.     /**
  63.      * @ORM\Column(type="datetime_immutable")
  64.      * @Gedmo\Timestampable(on="update")
  65.      */
  66.     private $updatedAt null;
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getUser(): ?User
  72.     {
  73.         return $this->user;
  74.     }
  75.     public function setUser(?User $user): self
  76.     {
  77.         $this->user $user;
  78.         return $this;
  79.     }
  80.     public function getCompany(): ?Company
  81.     {
  82.         return $this->company;
  83.     }
  84.     public function setCompany(?Company $company): self
  85.     {
  86.         $this->company $company;
  87.         return $this;
  88.     }
  89.     public function getNum(): ?string
  90.     {
  91.         return $this->num;
  92.     }
  93.     public function setNum(?string $num): self
  94.     {
  95.         $this->num $num;
  96.         return $this;
  97.     }
  98.     public function getStripePaymentId(): ?string
  99.     {
  100.         return $this->stripePaymentId;
  101.     }
  102.     public function setStripePaymentId(?string $stripePaymentId): self
  103.     {
  104.         $this->stripePaymentId $stripePaymentId;
  105.         return $this;
  106.     }
  107.     public function getWorkshop(): ?Workshop
  108.     {
  109.         return $this->workshop;
  110.     }
  111.     public function setWorkshop(?Workshop $workshop): self
  112.     {
  113.         $this->workshop $workshop;
  114.         return $this;
  115.     }
  116.     public function getEvent(): ?Event
  117.     {
  118.         return $this->event;
  119.     }
  120.     public function setEvent(?Event $event): self
  121.     {
  122.         $this->event $event;
  123.         return $this;
  124.     }
  125.     public function getAmountHt(): ?float
  126.     {
  127.         return $this->amountHt;
  128.     }
  129.     public function setAmountHt(?float $amountHt): self
  130.     {
  131.         $this->amountHt $amountHt;
  132.         return $this;
  133.     }
  134.     public function getAmountTtc(): ?float
  135.     {
  136.         return $this->amountTtc;
  137.     }
  138.     public function setAmountTtc(?float $amountTtc): self
  139.     {
  140.         $this->amountTtc $amountTtc;
  141.         return $this;
  142.     }
  143.     public function isPaid(): ?bool
  144.     {
  145.         return $this->paid;
  146.     }
  147.     public function setPaid(bool $paid): self
  148.     {
  149.         $this->paid $paid;
  150.         return $this;
  151.     }
  152.     public function getCreatedAt(): ?\DateTimeImmutable
  153.     {
  154.         return $this->createdAt;
  155.     }
  156.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  157.     {
  158.         $this->createdAt $createdAt;
  159.         return $this;
  160.     }
  161.     public function getUpdatedAt(): ?\DateTimeImmutable
  162.     {
  163.         return $this->updatedAt;
  164.     }
  165.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  166.     {
  167.         $this->updatedAt $updatedAt;
  168.         return $this;
  169.     }
  170. }