src/Entity/Billing.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\Repository\BillingRepository")
  9.  */
  10. class Billing
  11. {
  12.     /**
  13.      * @ORM\Id()
  14.      * @ORM\GeneratedValue()
  15.      * @ORM\Column(type="integer")
  16.      * @Groups("billing")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      * @Groups("billing")
  22.      */
  23.     private $number;
  24.    /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\Statut", inversedBy="billings")
  26.     * @Groups("billing")
  27.      */
  28.     private $idStatut;
  29.     /**
  30.      * @ORM\Column(type="datetime", nullable=true)
  31.      */
  32.     private $dateBilling;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $filenameBilling;
  37.     /**
  38.      * @ORM\OneToOne(targetEntity=Estimate::class, inversedBy="billing", cascade={"persist", "remove"})
  39.      */
  40.     private $numberEstimate;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity=ShoppingCart::class, inversedBy="billing")
  43.      */
  44.     private $idCart;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="billings")
  47.      */
  48.     private $idClient;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity=CompagnyInfo::class, inversedBy="billings")
  51.      */
  52.     private $idProvider;
  53.     /**
  54.      * @ORM\Column(type="string", length=255, nullable=true)
  55.      */
  56.     private $numberDeposit;
  57.     /**
  58.      * @ORM\Column(type="datetime", nullable=true)
  59.      */
  60.     private $dateDepositBilling;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $filenameDepositBilling;
  65.     /**
  66.      * @ORM\Column(type="string", length=255, nullable=true)
  67.      * @Groups("billing")
  68.      */
  69.     private $numberOutstanding;
  70.     /**
  71.      * @ORM\Column(type="datetime", nullable=true)
  72.      */
  73.     private $dateOutstandingBilling;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $filenameOutstandingBilling;
  78.     /**
  79.      * @ORM\OneToOne(targetEntity=MangopayPayin::class, cascade={"persist", "remove"})
  80.      */
  81.     private $payin;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity=Refund::class, mappedBy="billing")
  84.      */
  85.     private $refunds;
  86.     public function __construct()
  87.     {
  88.         $this->refunds = new ArrayCollection();
  89.     }
  90.     public function getId(): ?int
  91.     {
  92.         return $this->id;
  93.     }
  94.     public function getNumber(): ?string
  95.     {
  96.         return $this->number;
  97.     }
  98.     public function setNumber(?string $number): self
  99.     {
  100.         $this->number $number;
  101.         return $this;
  102.     }
  103.     
  104.     public function getIdStatut(): ?Statut
  105.     {
  106.         return $this->idStatut;
  107.     }
  108.     public function setIdStatut(?Statut $idStatut): self
  109.     {
  110.         $this->idStatut $idStatut;
  111.         return $this;
  112.     }
  113.     public function getDateBilling(): ?\DateTimeInterface
  114.     {
  115.         return $this->dateBilling;
  116.     }
  117.     public function setDateBilling(\DateTimeInterface $dateBilling): self
  118.     {
  119.         $this->dateBilling $dateBilling;
  120.         return $this;
  121.     }
  122.     public function getFilenameBilling(): ?string
  123.     {
  124.         return $this->filenameBilling;
  125.     }
  126.     public function setFilenameBilling(string $filenameBilling): self
  127.     {
  128.         $this->filenameBilling $filenameBilling;
  129.         return $this;
  130.     }
  131.     public function getNumberEstimate(): ?Estimate
  132.     {
  133.         return $this->numberEstimate;
  134.     }
  135.     public function setNumberEstimate(?Estimate $numberEstimate): self
  136.     {
  137.         $this->numberEstimate $numberEstimate;
  138.         return $this;
  139.     }
  140.     public function getIdCart(): ?ShoppingCart
  141.     {
  142.         return $this->idCart;
  143.     }
  144.     public function setIdCart(?ShoppingCart $idCart): self
  145.     {
  146.         $this->idCart $idCart;
  147.         return $this;
  148.     }
  149.     public function getIdClient(): ?User
  150.     {
  151.         return $this->idClient;
  152.     }
  153.     public function setIdClient(?User $idClient): self
  154.     {
  155.         $this->idClient $idClient;
  156.         return $this;
  157.     }
  158.     public function getIdProvider(): ?CompagnyInfo
  159.     {
  160.         return $this->idProvider;
  161.     }
  162.     public function setIdProvider(?CompagnyInfo $idProvider): self
  163.     {
  164.         $this->idProvider $idProvider;
  165.         return $this;
  166.     }
  167.     public function getNumberDeposit(): ?string
  168.     {
  169.         return $this->numberDeposit;
  170.     }
  171.     public function setNumberDeposit(?string $numberDeposit): self
  172.     {
  173.         $this->numberDeposit $numberDeposit;
  174.         return $this;
  175.     }
  176.     public function getDateDepositBilling(): ?\DateTimeInterface
  177.     {
  178.         return $this->dateDepositBilling;
  179.     }
  180.     public function setDateDepositBilling(?\DateTimeInterface $dateDepositBilling): self
  181.     {
  182.         $this->dateDepositBilling $dateDepositBilling;
  183.         return $this;
  184.     }
  185.     public function getFilenameDepositBilling(): ?string
  186.     {
  187.         return $this->filenameDepositBilling;
  188.     }
  189.     public function setFilenameDepositBilling(?string $filenameDepositBilling): self
  190.     {
  191.         $this->filenameDepositBilling $filenameDepositBilling;
  192.         return $this;
  193.     }
  194.     public function getNumberOutstanding(): ?string
  195.     {
  196.         return $this->numberOutstanding;
  197.     }
  198.     public function setNumberOutstanding(?string $numberOutstanding): self
  199.     {
  200.         $this->numberOutstanding $numberOutstanding;
  201.         return $this;
  202.     }
  203.     public function getDateOutstandingBilling(): ?\DateTimeInterface
  204.     {
  205.         return $this->dateOutstandingBilling;
  206.     }
  207.     public function setDateOutstandingBilling(?\DateTimeInterface $dateOutstandingBilling): self
  208.     {
  209.         $this->dateOutstandingBilling $dateOutstandingBilling;
  210.         return $this;
  211.     }
  212.     public function getFilenameOutstandingBilling(): ?string
  213.     {
  214.         return $this->filenameOutstandingBilling;
  215.     }
  216.     public function setFilenameOutstandingBilling(?string $filenameOutstandingBilling): self
  217.     {
  218.         $this->filenameOutstandingBilling $filenameOutstandingBilling;
  219.         return $this;
  220.     }
  221.     public function getPayin(): ?MangopayPayin
  222.     {
  223.         return $this->payin;
  224.     }
  225.     public function setPayin(?MangopayPayin $payin): self
  226.     {
  227.         $this->payin $payin;
  228.         return $this;
  229.     }
  230.     /**
  231.      * @return Collection|Refund[]
  232.      */
  233.     public function getRefunds(): Collection
  234.     {
  235.         return $this->refunds;
  236.     }
  237.     public function addRefund(Refund $refund): self
  238.     {
  239.         if (!$this->refunds->contains($refund)) {
  240.             $this->refunds[] = $refund;
  241.             $refund->setBilling($this);
  242.         }
  243.         return $this;
  244.     }
  245.     public function removeRefund(Refund $refund): self
  246.     {
  247.         if ($this->refunds->removeElement($refund)) {
  248.             // set the owning side to null (unless already changed)
  249.             if ($refund->getBilling() === $this) {
  250.                 $refund->setBilling(null);
  251.             }
  252.         }
  253.         return $this;
  254.     }
  255.     public function setShoppingCart(?ShoppingCart $cart): self
  256.     {
  257.         $this->idCart $cart;
  258.         return $this;
  259.     }
  260.     public function getShoppingCart(): ?ShoppingCart
  261.     {
  262.         return $this->idCart;
  263.     }
  264. }