src/Entity/FactureService.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FactureServiceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassFactureServiceRepository::class)]
  9. class FactureService
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  16.     private ?\DateTimeInterface $dateCreation null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $numero null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?float $montantTotal null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $status null;
  23.     #[ORM\ManyToOne(inversedBy'factureServices')]
  24.     private ?Client $client null;
  25.     /**
  26.      * Propriété non persistée utilisée uniquement pour le formulaire
  27.      */
  28.     private $services;
  29.     #[ORM\OneToMany(mappedBy'serviceFacture'targetEntityServiceFactureLigne::class, cascade: ['persist'])]
  30.     private Collection $serviceFactureLignes;
  31.     #[ORM\OneToMany(mappedBy'factureService'targetEntityRecette::class)]
  32.     private Collection $recettes;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $TypePaiement null;
  35.     #[ORM\ManyToOne(inversedBy'factureServices')]
  36.     private ?Boutique $boutique null;
  37.     public function __construct()
  38.     {
  39.         $this->serviceFactureLignes = new ArrayCollection();
  40.         $this->dateCreation = new \DateTime();
  41.         $this->recettes = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getDateCreation(): ?\DateTimeInterface
  48.     {
  49.         return $this->dateCreation;
  50.     }
  51.     public function setDateCreation(\DateTimeInterface $dateCreation): static
  52.     {
  53.         $this->dateCreation $dateCreation;
  54.         return $this;
  55.     }
  56.     public function getNumero(): ?string
  57.     {
  58.         return $this->numero;
  59.     }
  60.     public function setNumero(?string $numero): static
  61.     {
  62.         $this->numero $numero;
  63.         return $this;
  64.     }
  65.     public function getMontantTotal(): ?float
  66.     {
  67.         return $this->montantTotal;
  68.     }
  69.     public function setMontantTotal(?float $montantTotal): static
  70.     {
  71.         $this->montantTotal $montantTotal;
  72.         return $this;
  73.     }
  74.     public function getStatus(): ?string
  75.     {
  76.         return $this->status;
  77.     }
  78.     public function setStatus(?string $status): static
  79.     {
  80.         $this->status $status;
  81.         return $this;
  82.     }
  83.     public function getClient(): ?Client
  84.     {
  85.         return $this->client;
  86.     }
  87.     public function setClient(?Client $client): static
  88.     {
  89.         $this->client $client;
  90.         return $this;
  91.     }
  92.     /**
  93.      * @return Collection<int, ServiceFactureLigne>
  94.      */
  95.     public function getServiceFactureLignes(): Collection
  96.     {
  97.         return $this->serviceFactureLignes;
  98.     }
  99.     public function addServiceFactureLigne(ServiceFactureLigne $serviceFactureLigne): static
  100.     {
  101.         if (!$this->serviceFactureLignes->contains($serviceFactureLigne)) {
  102.             $this->serviceFactureLignes->add($serviceFactureLigne);
  103.             $serviceFactureLigne->setServiceFacture($this);
  104.         }
  105.         return $this;
  106.     }
  107.     public function removeServiceFactureLigne(ServiceFactureLigne $serviceFactureLigne): static
  108.     {
  109.         if ($this->serviceFactureLignes->removeElement($serviceFactureLigne)) {
  110.             // set the owning side to null (unless already changed)
  111.             if ($serviceFactureLigne->getServiceFacture() === $this) {
  112.                 $serviceFactureLigne->setServiceFacture(null);
  113.             }
  114.         }
  115.         return $this;
  116.     }
  117.     public function getServices()
  118.     {
  119.         return $this->services;
  120.     }
  121.     public function setServices($services): self
  122.     {
  123.         $this->services $services;
  124.         return $this;
  125.     }
  126.     /**
  127.      * @return Collection<int, Recette>
  128.      */
  129.     public function getRecettes(): Collection
  130.     {
  131.         return $this->recettes;
  132.     }
  133.     public function addRecette(Recette $recette): static
  134.     {
  135.         if (!$this->recettes->contains($recette)) {
  136.             $this->recettes->add($recette);
  137.             $recette->setFactureService($this);
  138.         }
  139.         return $this;
  140.     }
  141.     public function removeRecette(Recette $recette): static
  142.     {
  143.         if ($this->recettes->removeElement($recette)) {
  144.             // set the owning side to null (unless already changed)
  145.             if ($recette->getFactureService() === $this) {
  146.                 $recette->setFactureService(null);
  147.             }
  148.         }
  149.         return $this;
  150.     }
  151.     public function getTypePaiement(): ?string
  152.     {
  153.         return $this->TypePaiement;
  154.     }
  155.     public function setTypePaiement(?string $TypePaiement): static
  156.     {
  157.         $this->TypePaiement $TypePaiement;
  158.         return $this;
  159.     }
  160.     
  161.     public function getBoutique(): ?Boutique
  162.     {
  163.         return $this->boutique;
  164.     }
  165.     public function setBoutique(?Boutique $boutique): static
  166.     {
  167.         $this->boutique $boutique;
  168.         return $this;
  169.     }
  170. }