src/Entity/JobCard.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\JobCardRepository;
  4. use DateTimeImmutable;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassJobCardRepository::class)]
  10. class JobCard
  11. {
  12.     const SOUMIS 'SOUMIS';
  13.     const EN_COURS 'En COURS';
  14.     const TERMINE 'TERMINE';
  15.     const ANNULER 'ANNULER';
  16.     const VALIDER 'VALIDER';
  17.     const SUSPENDU 'SUSPENDU';
  18.     const DEBLOQUER 'DEBLOQUER';
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue]
  21.     #[ORM\Column]
  22.     private ?int $id null;
  23.     #[ORM\Column(length15nullabletrue)]
  24.     private ?string $immatriculationVehicule null;
  25.     #[ORM\Column(length15nullabletrue)]
  26.     private ?string $couleur null;
  27.     #[ORM\Column(length50nullabletrue)]
  28.     private ?string $modele null;
  29.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  30.     private ?string $description null;
  31.     #[ORM\Column]
  32.     private ?\DateTimeImmutable $createdAt null;
  33.     #[ORM\Column]
  34.     private ?\DateTimeImmutable $updatedAt null;
  35.     #[ORM\Column(length10nullabletrue)]
  36.     private ?string $pneumatique null;
  37.     #[ORM\ManyToOne]
  38.     private ?MarqueVoiture $marque null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $images null;
  41.     #[ORM\ManyToOne(inversedBy'jobcards')]
  42.     private ?User $user null;
  43.     #[ORM\Column(length50)]
  44.     private ?string $status null;
  45.     #[ORM\ManyToMany(targetEntityService::class, inversedBy'jobCards')]
  46.     private Collection $services;
  47.     #[ORM\Column(length255nullabletrue)]
  48.     private ?string $numero null;
  49.     #[ORM\ManyToOne(inversedBy'jobcards')]
  50.     private ?Commercial $commercial null;
  51.     #[ORM\Column(length255nullabletrue)]
  52.     private ?string $miseEnCirculation null;
  53.     #[ORM\Column(length255nullabletrue)]
  54.     private ?string $kilometrage null;
  55.     #[ORM\Column(length255nullabletrue)]
  56.     private ?string $carburant null;
  57.     #[ORM\Column(length255nullabletrue)]
  58.     private ?string $boiteDeVitesse null;
  59.     #[ORM\Column(length255nullabletrue)]
  60.     private ?string $rayures null;
  61.     #[ORM\Column(length255nullabletrue)]
  62.     private ?string $deformination null;
  63.     #[ORM\Column(length50nullabletrue)]
  64.     private ?string $phareD null;
  65.     #[ORM\Column(length50nullabletrue)]
  66.     private ?string $phareG null;
  67.     #[ORM\Column(length50nullabletrue)]
  68.     private ?string $pareBrise null;
  69.     #[ORM\Column(length100nullabletrue)]
  70.     private ?string $vidangeMoteur null;
  71.     #[ORM\Column(length100nullabletrue)]
  72.     private ?string $vidangePontAV null;
  73.     #[ORM\Column(length100nullabletrue)]
  74.     private ?string $filtreAire null;
  75.     #[ORM\Column(length100nullabletrue)]
  76.     private ?string $lavage null;
  77.     #[ORM\Column(length100nullabletrue)]
  78.     private ?string $equilibreRoues null;
  79.     #[ORM\Column(length100nullabletrue)]
  80.     private ?string $controleNiveau null;
  81.     #[ORM\Column(length100nullabletrue)]
  82.     private ?string $nettoyage null;
  83.     #[ORM\Column(length100nullabletrue)]
  84.     private ?string $vidangeBoite null;
  85.     #[ORM\Column(length100nullabletrue)]
  86.     private ?string $vidangePontAr null;
  87.     #[ORM\Column(length100nullabletrue)]
  88.     private ?string $freinAr null;
  89.     #[ORM\Column(length100nullabletrue)]
  90.     private ?string $freinAhuile null;
  91.     #[ORM\Column(length100nullabletrue)]
  92.     private ?string $graissageTransmission null;
  93.     #[ORM\Column(length100nullabletrue)]
  94.     private ?string $pressionDespneux null;
  95.     #[ORM\Column(length100nullabletrue)]
  96.     private ?string $controleEclairage null;
  97.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  98.     private ?string $traveauxDemander null;
  99.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  100.     private ?\DateTimeInterface $dateEtatDesLieuxEntrant null;
  101.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  102.     private ?string $autreObservations null;
  103.     #[ORM\Column(length255nullabletrue)]
  104.     private ?string $marqueVoiture null;  
  105.     #[ORM\OneToMany(mappedBy'jobcard'targetEntityHistorique::class)]
  106.     private Collection $historiques;
  107.     #[ORM\Column(length255nullabletrue)]
  108.     private ?string $freinAv null;
  109.     #[ORM\Column(typeTypes::ARRAY, nullabletrue)]
  110.     private ?array $imageFile null;
  111.     #[ORM\Column(length255nullabletrue)]
  112.     private ?string $clientSignature null;
  113.     #[ORM\Column(length255nullabletrue)]
  114.     private ?string $commercialSignature null;
  115.   
  116.     #[ORM\Column(length255nullabletrue)]
  117.     private ?string $nomCommercial null;
  118.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  119.     private ?\DateTimeInterface $dateArrivee null;
  120.   
  121.     #[ORM\ManyToOne(inversedBy'jobCards')]
  122.     private ?Calendrier $calendrier null;
  123.     #[ORM\Column]
  124.     private ?bool $isEtatEntre null;
  125.     #[ORM\OneToMany(mappedBy'jobCard'targetEntityTraveaux::class)]
  126.     private Collection $traveauxes;
  127.     #[ORM\OneToMany(mappedBy'jobCard'targetEntityDevis::class)]
  128.     private Collection $devis;
  129.     public function getId(): ?int
  130.     {     
  131.         return $this->id;
  132.     }
  133.     public function getImmatriculationVehicule(): ?string
  134.     {
  135.         return $this->immatriculationVehicule;
  136.     }
  137.     public function setImmatriculationVehicule(string $immatriculationVehicule): static
  138.     {
  139.         $this->immatriculationVehicule $immatriculationVehicule;
  140.         return $this;
  141.     }
  142.     public function getCouleur(): ?string
  143.     {
  144.         return $this->couleur;
  145.     }
  146.     public function setCouleur(string $couleur): static
  147.     {
  148.         $this->couleur $couleur;
  149.         return $this;
  150.     }
  151.     public function getModele(): ?string
  152.     {
  153.         return $this->modele;
  154.     }
  155.     public function setModele(string $modele): static
  156.     {
  157.         $this->modele $modele;
  158.         return $this;
  159.     }
  160.     public function getDescription(): ?string
  161.     {
  162.         return $this->description;
  163.     }
  164.     public function setDescription(string $description): static
  165.     {
  166.         $this->description $description;
  167.         return $this;
  168.     }
  169.     public function getCreatedAt(): ?\DateTimeImmutable
  170.     {
  171.         return $this->createdAt;
  172.     }
  173.     public function setCreatedAt(\DateTimeImmutable $createdAt): static
  174.     {
  175.         $this->createdAt $createdAt;
  176.         return $this;
  177.     }
  178.     public function getUpdatedAt(): ?\DateTimeImmutable
  179.     {
  180.         return $this->updatedAt;
  181.     }
  182.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): static
  183.     {
  184.         $this->updatedAt $updatedAt;
  185.         return $this;
  186.     }
  187.     public function getPneumatique(): ?string
  188.     {
  189.         return $this->pneumatique;
  190.     }
  191.     public function setPneumatique(?string $pneumatique): static
  192.     {
  193.         $this->pneumatique $pneumatique;
  194.         return $this;
  195.     }
  196.     public function getMarque(): ?MarqueVoiture
  197.     {
  198.         return $this->marque;
  199.     }
  200.     public function setMarque(?MarqueVoiture $marque): static
  201.     {
  202.         $this->marque $marque;
  203.         return $this;
  204.     }
  205.     public function __construct()
  206.     {
  207.         $this->createdAt = new DateTimeImmutable();
  208.         $this->updatedAt = new DateTimeImmutable();
  209.         $this->services = new ArrayCollection();
  210.         $this->status JobCard::SOUMIS;
  211.         $this->isEtatEntre false;
  212.         $this->historiques = new ArrayCollection();
  213.         $this->traveauxes = new ArrayCollection();
  214.         $this->devis = new ArrayCollection();
  215.     }
  216.     public function getImages(): ?string
  217.     {
  218.         return $this->images;
  219.     }
  220.     public function setImages(?string $images): static
  221.     {
  222.         $this->images $images;
  223.         return $this;
  224.     }
  225.     public function getUser(): ?User
  226.     {
  227.         return $this->user;
  228.     }
  229.     public function setUser(?User $user): static
  230.     {
  231.         $this->user $user;
  232.         return $this;
  233.     }
  234.     public function getStatus(): ?string
  235.     {
  236.         return $this->status;
  237.     }
  238.     public function setStatus(string $status): static
  239.     {
  240.         $this->status $status;
  241.         return $this;
  242.     }
  243.     /**
  244.      * @return Collection<int, Service>
  245.      */
  246.     public function getServices(): Collection
  247.     {
  248.         return $this->services;
  249.     }
  250.     public function addService(Service $service): static
  251.     {
  252.         if (!$this->services->contains($service)) {
  253.             $this->services->add($service);
  254.         }
  255.         return $this;
  256.     }
  257.     public function removeService(Service $service): static
  258.     {
  259.         $this->services->removeElement($service);
  260.         return $this;
  261.     }
  262.     public function getNumero(): ?string
  263.     {
  264.         return $this->numero;
  265.     }
  266.     public function setNumero(string $numero): static
  267.     {
  268.         $this->numero $numero;
  269.         return $this;
  270.     }
  271.     public function getCommercial(): ?Commercial
  272.     {
  273.         return $this->commercial;
  274.     }
  275.     public function setCommercial(?Commercial $commercial): static
  276.     {
  277.         $this->commercial $commercial;
  278.         return $this;
  279.     }
  280.     public function getMiseEnCirculation(): ?string
  281.     {
  282.         return $this->miseEnCirculation;
  283.     }
  284.     public function setMiseEnCirculation(?string $miseEnCirculation): static
  285.     {
  286.         $this->miseEnCirculation $miseEnCirculation;
  287.         return $this;
  288.     }
  289.     public function getKilometrage(): ?string
  290.     {
  291.         return $this->kilometrage;
  292.     }
  293.     public function setKilometrage(?string $kilometrage): static
  294.     {
  295.         $this->kilometrage $kilometrage;
  296.         return $this;
  297.     }
  298.     public function getCarburant(): ?string
  299.     {
  300.         return $this->carburant;
  301.     }
  302.     public function setCarburant(?string $carburant): static
  303.     {
  304.         $this->carburant $carburant;
  305.         return $this;
  306.     }
  307.     public function getBoiteDeVitesse(): ?string
  308.     {
  309.         return $this->boiteDeVitesse;
  310.     }
  311.     public function setBoiteDeVitesse(?string $boiteDeVitesse): static
  312.     {
  313.         $this->boiteDeVitesse $boiteDeVitesse;
  314.         return $this;
  315.     }
  316.     public function getRayures(): ?string
  317.     {
  318.         return $this->rayures;
  319.     }
  320.     public function setRayures(?string $rayures): static
  321.     {
  322.         $this->rayures $rayures;
  323.         return $this;
  324.     }
  325.     public function getDeformination(): ?string
  326.     {
  327.         return $this->deformination;
  328.     }
  329.     public function setDeformination(?string $deformination): static
  330.     {
  331.         $this->deformination $deformination;
  332.         return $this;
  333.     }
  334.     public function getPhareD(): ?string
  335.     {
  336.         return $this->phareD;
  337.     }
  338.     public function setPhareD(?string $phareD): static
  339.     {
  340.         $this->phareD $phareD;
  341.         return $this;
  342.     }
  343.     public function getPhareG(): ?string
  344.     {
  345.         return $this->phareG;
  346.     }
  347.     public function setPhareG(?string $phareG): static
  348.     {
  349.         $this->phareG $phareG;
  350.         return $this;
  351.     }
  352.     public function getPareBrise(): ?string
  353.     {
  354.         return $this->pareBrise;
  355.     }
  356.     public function setPareBrise(?string $pareBrise): static
  357.     {
  358.         $this->pareBrise $pareBrise;
  359.         return $this;
  360.     }
  361.     public function getVidangeMoteur(): ?string
  362.     {
  363.         return $this->vidangeMoteur;
  364.     }
  365.     public function setVidangeMoteur(?string $vidangeMoteur): static
  366.     {
  367.         $this->vidangeMoteur $vidangeMoteur;
  368.         return $this;
  369.     }
  370.     public function getVidangePontAV(): ?string
  371.     {
  372.         return $this->vidangePontAV;
  373.     }
  374.     public function setVidangePontAV(?string $vidangePontAV): static
  375.     {
  376.         $this->vidangePontAV $vidangePontAV;
  377.         return $this;
  378.     }
  379.     public function getFiltreAire(): ?string
  380.     {
  381.         return $this->filtreAire;
  382.     }
  383.     public function setFiltreAire(?string $filtreAire): static
  384.     {
  385.         $this->filtreAire $filtreAire;
  386.         return $this;
  387.     }
  388.     public function getLavage(): ?string
  389.     {
  390.         return $this->lavage;
  391.     }
  392.     public function setLavage(?string $lavage): static
  393.     {
  394.         $this->lavage $lavage;
  395.         return $this;
  396.     }
  397.     public function getEquilibreRoues(): ?string
  398.     {
  399.         return $this->equilibreRoues;
  400.     }
  401.     public function setEquilibreRoues(?string $equilibreRoues): static
  402.     {
  403.         $this->equilibreRoues $equilibreRoues;
  404.         return $this;
  405.     }
  406.     public function getControleNiveau(): ?string
  407.     {
  408.         return $this->controleNiveau;
  409.     }
  410.     public function setControleNiveau(?string $controleNiveau): static
  411.     {
  412.         $this->controleNiveau $controleNiveau;
  413.         return $this;
  414.     }
  415.     public function getNettoyage(): ?string
  416.     {
  417.         return $this->nettoyage;
  418.     }
  419.     public function setNettoyage(?string $nettoyage): static
  420.     {
  421.         $this->nettoyage $nettoyage;
  422.         return $this;
  423.     }
  424.     public function getVidangeBoite(): ?string
  425.     {
  426.         return $this->vidangeBoite;
  427.     }
  428.     public function setVidangeBoite(?string $vidangeBoite): static
  429.     {
  430.         $this->vidangeBoite $vidangeBoite;
  431.         return $this;
  432.     }
  433.     public function getVidangePontAr(): ?string
  434.     {
  435.         return $this->vidangePontAr;
  436.     }
  437.     public function setVidangePontAr(?string $vidangePontAr): static
  438.     {
  439.         $this->vidangePontAr $vidangePontAr;
  440.         return $this;
  441.     }
  442.     public function getFreinAr(): ?string
  443.     {
  444.         return $this->freinAr;
  445.     }
  446.     public function setFreinAr(?string $freinAr): static
  447.     {
  448.         $this->freinAr $freinAr;
  449.         return $this;
  450.     }
  451.     public function getFreinAhuile(): ?string
  452.     {
  453.         return $this->freinAhuile;
  454.     }
  455.     public function setFreinAhuile(string $freinAhuile): static
  456.     {
  457.         $this->freinAhuile $freinAhuile;
  458.         return $this;
  459.     }
  460.     public function getGraissageTransmission(): ?string
  461.     {
  462.         return $this->graissageTransmission;
  463.     }
  464.     public function setGraissageTransmission(?string $graissageTransmission): static
  465.     {
  466.         $this->graissageTransmission $graissageTransmission;
  467.         return $this;
  468.     }
  469.     public function getPressionDespneux(): ?string
  470.     {
  471.         return $this->pressionDespneux;
  472.     }
  473.     public function setPressionDespneux(?string $pressionDespneux): static
  474.     {
  475.         $this->pressionDespneux $pressionDespneux;
  476.         return $this;
  477.     }
  478.     public function getControleEclairage(): ?string
  479.     {
  480.         return $this->controleEclairage;
  481.     }
  482.     public function setControleEclairage(?string $controleEclairage): static
  483.     {
  484.         $this->controleEclairage $controleEclairage;
  485.         return $this;
  486.     }   
  487.     public function getTraveauxDemander(): ?string
  488.     {
  489.         return $this->traveauxDemander;
  490.     }
  491.     public function setTraveauxDemander(?string $traveauxDemander): static
  492.     {
  493.         $this->traveauxDemander $traveauxDemander;
  494.         return $this;
  495.     }
  496.     public function getDateEtatDesLieuxEntrant(): ?\DateTimeInterface
  497.     {
  498.         return $this->dateEtatDesLieuxEntrant;
  499.     }
  500.     public function setDateEtatDesLieuxEntrant(?\DateTimeInterface $dateEtatDesLieuxEntrant): static
  501.     {
  502.         $this->dateEtatDesLieuxEntrant $dateEtatDesLieuxEntrant;
  503.         return $this;
  504.     }
  505.     public function getAutreObservations(): ?string
  506.     {
  507.         return $this->autreObservations;
  508.     }
  509.     public function setAutreObservations(?string $autreObservations): static
  510.     {
  511.         $this->autreObservations $autreObservations;
  512.         return $this;
  513.     }
  514.     public function getMarqueVoiture(): ?string
  515.     {
  516.         return $this->marqueVoiture;
  517.     }
  518.     public function setMarqueVoiture(?string $marqueVoiture): static
  519.     {
  520.         $this->marqueVoiture $marqueVoiture;
  521.         return $this;
  522.     }
  523.     public function __toString()
  524.     {
  525.         return $this->marqueVoiture;
  526.     }
  527.     /**
  528.      * @return Collection<int, Historique>
  529.      */
  530.     public function getHistoriques(): Collection
  531.     {
  532.         return $this->historiques;
  533.     }
  534.     public function addHistorique(Historique $historique): static
  535.     {
  536.         if (!$this->historiques->contains($historique)) {
  537.             $this->historiques->add($historique);
  538.             $historique->setJobcard($this);
  539.         }
  540.         return $this;
  541.     }
  542.     public function removeHistorique(Historique $historique): static
  543.     {
  544.         if ($this->historiques->removeElement($historique)) {
  545.             // set the owning side to null (unless already changed)
  546.             if ($historique->getJobcard() === $this) {
  547.                 $historique->setJobcard(null);
  548.             }
  549.         }
  550.         return $this;
  551.     }
  552.     public function getFreinAv(): ?string
  553.     {
  554.         return $this->freinAv;
  555.     }
  556.     public function setFreinAv(?string $freinAv): static
  557.     {
  558.         $this->freinAv $freinAv;
  559.         return $this;
  560.     }
  561.     public function getImageFile(): ?array
  562.     {
  563.         return $this->imageFile;
  564.     }
  565.     public function setImageFile(?array $imageFile): static
  566.     {
  567.         $this->imageFile $imageFile;
  568.         return $this;
  569.     }
  570.     public function getClientSignature(): ?string
  571.     {
  572.         return $this->clientSignature;
  573.     }
  574.     public function setClientSignature(?string $clientSignature): static
  575.     {
  576.         $this->clientSignature $clientSignature;
  577.         return $this;
  578.     }
  579.     public function getCommercialSignature(): ?string
  580.     {
  581.         return $this->commercialSignature;
  582.     }
  583.     public function setCommercialSignature(?string $commercialSignature): static
  584.     {
  585.         $this->commercialSignature $commercialSignature;
  586.         return $this;
  587.     }
  588.     public function getNomCommercial(): ?string
  589.     {
  590.         return $this->nomCommercial;
  591.     }
  592.     public function setNomCommercial(?string $nomCommercial): static
  593.     {
  594.         $this->nomCommercial $nomCommercial;
  595.         return $this;
  596.     }
  597.     public function getDateArrivee(): ?\DateTimeInterface
  598.     {
  599.         return $this->dateArrivee;
  600.     }
  601.     public function setDateArrivee(?\DateTimeInterface $dateArrivee): static
  602.     {
  603.         $this->dateArrivee $dateArrivee;
  604.         return $this;
  605.     }
  606.     public function getCalendrier(): ?Calendrier
  607.     {
  608.         return $this->calendrier;
  609.     }
  610.     public function setCalendrier(?Calendrier $calendrier): static
  611.     {
  612.         $this->calendrier $calendrier;
  613.         return $this;
  614.     }
  615.     
  616.     public function isIsEtatEntre(): ?bool
  617.     {
  618.         return $this->isEtatEntre;
  619.     }
  620.     public function setIsEtatEntre(bool $isEtatEntre): static
  621.     {
  622.         $this->isEtatEntre $isEtatEntre;
  623.         return $this;
  624.     }
  625.     /**
  626.      * @return Collection<int, Traveaux>
  627.      */
  628.     public function getTraveauxes(): Collection
  629.     {
  630.         return $this->traveauxes;
  631.     }
  632.     public function addTraveaux(Traveaux $traveaux): static
  633.     {
  634.         if (!$this->traveauxes->contains($traveaux)) {
  635.             $this->traveauxes->add($traveaux);
  636.             $traveaux->setJobCard($this);
  637.         }
  638.         return $this;
  639.     }
  640.     public function removeTraveaux(Traveaux $traveaux): static
  641.     {
  642.         if ($this->traveauxes->removeElement($traveaux)) {
  643.             // set the owning side to null (unless already changed)
  644.             if ($traveaux->getJobCard() === $this) {
  645.                 $traveaux->setJobCard(null);
  646.             }
  647.         }
  648.         return $this;
  649.     }
  650.     /**
  651.      * @return Collection<int, Devis>
  652.      */
  653.     public function getDevis(): Collection
  654.     {
  655.         return $this->devis;
  656.     }
  657.     public function addDevi(Devis $devi): static
  658.     {
  659.         if (!$this->devis->contains($devi)) {
  660.             $this->devis->add($devi);
  661.             $devi->setJobCard($this);
  662.         }
  663.         return $this;
  664.     }
  665.     public function removeDevi(Devis $devi): static
  666.     {
  667.         if ($this->devis->removeElement($devi)) {
  668.             // set the owning side to null (unless already changed)
  669.             if ($devi->getJobCard() === $this) {
  670.                 $devi->setJobCard(null);
  671.             }
  672.         }
  673.         return $this;
  674.     } 
  675. }