<?php
namespace App\Entity;
use App\Repository\JobCardRepository;
use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: JobCardRepository::class)]
class JobCard
{
const SOUMIS = 'SOUMIS';
const EN_COURS = 'En COURS';
const TERMINE = 'TERMINE';
const ANNULER = 'ANNULER';
const VALIDER = 'VALIDER';
const SUSPENDU = 'SUSPENDU';
const DEBLOQUER = 'DEBLOQUER';
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 15, nullable: true)]
private ?string $immatriculationVehicule = null;
#[ORM\Column(length: 15, nullable: true)]
private ?string $couleur = null;
#[ORM\Column(length: 50, nullable: true)]
private ?string $modele = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column]
private ?\DateTimeImmutable $updatedAt = null;
#[ORM\Column(length: 10, nullable: true)]
private ?string $pneumatique = null;
#[ORM\ManyToOne]
private ?MarqueVoiture $marque = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $images = null;
#[ORM\ManyToOne(inversedBy: 'jobcards')]
private ?User $user = null;
#[ORM\Column(length: 50)]
private ?string $status = null;
#[ORM\ManyToMany(targetEntity: Service::class, inversedBy: 'jobCards')]
private Collection $services;
#[ORM\Column(length: 255, nullable: true)]
private ?string $numero = null;
#[ORM\ManyToOne(inversedBy: 'jobcards')]
private ?Commercial $commercial = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $miseEnCirculation = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $kilometrage = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $carburant = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $boiteDeVitesse = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $rayures = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $deformination = null;
#[ORM\Column(length: 50, nullable: true)]
private ?string $phareD = null;
#[ORM\Column(length: 50, nullable: true)]
private ?string $phareG = null;
#[ORM\Column(length: 50, nullable: true)]
private ?string $pareBrise = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $vidangeMoteur = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $vidangePontAV = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $filtreAire = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $lavage = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $equilibreRoues = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $controleNiveau = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $nettoyage = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $vidangeBoite = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $vidangePontAr = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $freinAr = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $freinAhuile = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $graissageTransmission = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $pressionDespneux = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $controleEclairage = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $traveauxDemander = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateEtatDesLieuxEntrant = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $autreObservations = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $marqueVoiture = null;
#[ORM\OneToMany(mappedBy: 'jobcard', targetEntity: Historique::class)]
private Collection $historiques;
#[ORM\Column(length: 255, nullable: true)]
private ?string $freinAv = null;
#[ORM\Column(type: Types::ARRAY, nullable: true)]
private ?array $imageFile = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $clientSignature = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $commercialSignature = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nomCommercial = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $dateArrivee = null;
#[ORM\ManyToOne(inversedBy: 'jobCards')]
private ?Calendrier $calendrier = null;
#[ORM\Column]
private ?bool $isEtatEntre = null;
#[ORM\OneToMany(mappedBy: 'jobCard', targetEntity: Traveaux::class)]
private Collection $traveauxes;
#[ORM\OneToMany(mappedBy: 'jobCard', targetEntity: Devis::class)]
private Collection $devis;
public function getId(): ?int
{
return $this->id;
}
public function getImmatriculationVehicule(): ?string
{
return $this->immatriculationVehicule;
}
public function setImmatriculationVehicule(string $immatriculationVehicule): static
{
$this->immatriculationVehicule = $immatriculationVehicule;
return $this;
}
public function getCouleur(): ?string
{
return $this->couleur;
}
public function setCouleur(string $couleur): static
{
$this->couleur = $couleur;
return $this;
}
public function getModele(): ?string
{
return $this->modele;
}
public function setModele(string $modele): static
{
$this->modele = $modele;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): static
{
$this->description = $description;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): static
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getPneumatique(): ?string
{
return $this->pneumatique;
}
public function setPneumatique(?string $pneumatique): static
{
$this->pneumatique = $pneumatique;
return $this;
}
public function getMarque(): ?MarqueVoiture
{
return $this->marque;
}
public function setMarque(?MarqueVoiture $marque): static
{
$this->marque = $marque;
return $this;
}
public function __construct()
{
$this->createdAt = new DateTimeImmutable();
$this->updatedAt = new DateTimeImmutable();
$this->services = new ArrayCollection();
$this->status = JobCard::SOUMIS;
$this->isEtatEntre = false;
$this->historiques = new ArrayCollection();
$this->traveauxes = new ArrayCollection();
$this->devis = new ArrayCollection();
}
public function getImages(): ?string
{
return $this->images;
}
public function setImages(?string $images): static
{
$this->images = $images;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): static
{
$this->user = $user;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): static
{
$this->status = $status;
return $this;
}
/**
* @return Collection<int, Service>
*/
public function getServices(): Collection
{
return $this->services;
}
public function addService(Service $service): static
{
if (!$this->services->contains($service)) {
$this->services->add($service);
}
return $this;
}
public function removeService(Service $service): static
{
$this->services->removeElement($service);
return $this;
}
public function getNumero(): ?string
{
return $this->numero;
}
public function setNumero(string $numero): static
{
$this->numero = $numero;
return $this;
}
public function getCommercial(): ?Commercial
{
return $this->commercial;
}
public function setCommercial(?Commercial $commercial): static
{
$this->commercial = $commercial;
return $this;
}
public function getMiseEnCirculation(): ?string
{
return $this->miseEnCirculation;
}
public function setMiseEnCirculation(?string $miseEnCirculation): static
{
$this->miseEnCirculation = $miseEnCirculation;
return $this;
}
public function getKilometrage(): ?string
{
return $this->kilometrage;
}
public function setKilometrage(?string $kilometrage): static
{
$this->kilometrage = $kilometrage;
return $this;
}
public function getCarburant(): ?string
{
return $this->carburant;
}
public function setCarburant(?string $carburant): static
{
$this->carburant = $carburant;
return $this;
}
public function getBoiteDeVitesse(): ?string
{
return $this->boiteDeVitesse;
}
public function setBoiteDeVitesse(?string $boiteDeVitesse): static
{
$this->boiteDeVitesse = $boiteDeVitesse;
return $this;
}
public function getRayures(): ?string
{
return $this->rayures;
}
public function setRayures(?string $rayures): static
{
$this->rayures = $rayures;
return $this;
}
public function getDeformination(): ?string
{
return $this->deformination;
}
public function setDeformination(?string $deformination): static
{
$this->deformination = $deformination;
return $this;
}
public function getPhareD(): ?string
{
return $this->phareD;
}
public function setPhareD(?string $phareD): static
{
$this->phareD = $phareD;
return $this;
}
public function getPhareG(): ?string
{
return $this->phareG;
}
public function setPhareG(?string $phareG): static
{
$this->phareG = $phareG;
return $this;
}
public function getPareBrise(): ?string
{
return $this->pareBrise;
}
public function setPareBrise(?string $pareBrise): static
{
$this->pareBrise = $pareBrise;
return $this;
}
public function getVidangeMoteur(): ?string
{
return $this->vidangeMoteur;
}
public function setVidangeMoteur(?string $vidangeMoteur): static
{
$this->vidangeMoteur = $vidangeMoteur;
return $this;
}
public function getVidangePontAV(): ?string
{
return $this->vidangePontAV;
}
public function setVidangePontAV(?string $vidangePontAV): static
{
$this->vidangePontAV = $vidangePontAV;
return $this;
}
public function getFiltreAire(): ?string
{
return $this->filtreAire;
}
public function setFiltreAire(?string $filtreAire): static
{
$this->filtreAire = $filtreAire;
return $this;
}
public function getLavage(): ?string
{
return $this->lavage;
}
public function setLavage(?string $lavage): static
{
$this->lavage = $lavage;
return $this;
}
public function getEquilibreRoues(): ?string
{
return $this->equilibreRoues;
}
public function setEquilibreRoues(?string $equilibreRoues): static
{
$this->equilibreRoues = $equilibreRoues;
return $this;
}
public function getControleNiveau(): ?string
{
return $this->controleNiveau;
}
public function setControleNiveau(?string $controleNiveau): static
{
$this->controleNiveau = $controleNiveau;
return $this;
}
public function getNettoyage(): ?string
{
return $this->nettoyage;
}
public function setNettoyage(?string $nettoyage): static
{
$this->nettoyage = $nettoyage;
return $this;
}
public function getVidangeBoite(): ?string
{
return $this->vidangeBoite;
}
public function setVidangeBoite(?string $vidangeBoite): static
{
$this->vidangeBoite = $vidangeBoite;
return $this;
}
public function getVidangePontAr(): ?string
{
return $this->vidangePontAr;
}
public function setVidangePontAr(?string $vidangePontAr): static
{
$this->vidangePontAr = $vidangePontAr;
return $this;
}
public function getFreinAr(): ?string
{
return $this->freinAr;
}
public function setFreinAr(?string $freinAr): static
{
$this->freinAr = $freinAr;
return $this;
}
public function getFreinAhuile(): ?string
{
return $this->freinAhuile;
}
public function setFreinAhuile(string $freinAhuile): static
{
$this->freinAhuile = $freinAhuile;
return $this;
}
public function getGraissageTransmission(): ?string
{
return $this->graissageTransmission;
}
public function setGraissageTransmission(?string $graissageTransmission): static
{
$this->graissageTransmission = $graissageTransmission;
return $this;
}
public function getPressionDespneux(): ?string
{
return $this->pressionDespneux;
}
public function setPressionDespneux(?string $pressionDespneux): static
{
$this->pressionDespneux = $pressionDespneux;
return $this;
}
public function getControleEclairage(): ?string
{
return $this->controleEclairage;
}
public function setControleEclairage(?string $controleEclairage): static
{
$this->controleEclairage = $controleEclairage;
return $this;
}
public function getTraveauxDemander(): ?string
{
return $this->traveauxDemander;
}
public function setTraveauxDemander(?string $traveauxDemander): static
{
$this->traveauxDemander = $traveauxDemander;
return $this;
}
public function getDateEtatDesLieuxEntrant(): ?\DateTimeInterface
{
return $this->dateEtatDesLieuxEntrant;
}
public function setDateEtatDesLieuxEntrant(?\DateTimeInterface $dateEtatDesLieuxEntrant): static
{
$this->dateEtatDesLieuxEntrant = $dateEtatDesLieuxEntrant;
return $this;
}
public function getAutreObservations(): ?string
{
return $this->autreObservations;
}
public function setAutreObservations(?string $autreObservations): static
{
$this->autreObservations = $autreObservations;
return $this;
}
public function getMarqueVoiture(): ?string
{
return $this->marqueVoiture;
}
public function setMarqueVoiture(?string $marqueVoiture): static
{
$this->marqueVoiture = $marqueVoiture;
return $this;
}
public function __toString()
{
return $this->marqueVoiture;
}
/**
* @return Collection<int, Historique>
*/
public function getHistoriques(): Collection
{
return $this->historiques;
}
public function addHistorique(Historique $historique): static
{
if (!$this->historiques->contains($historique)) {
$this->historiques->add($historique);
$historique->setJobcard($this);
}
return $this;
}
public function removeHistorique(Historique $historique): static
{
if ($this->historiques->removeElement($historique)) {
// set the owning side to null (unless already changed)
if ($historique->getJobcard() === $this) {
$historique->setJobcard(null);
}
}
return $this;
}
public function getFreinAv(): ?string
{
return $this->freinAv;
}
public function setFreinAv(?string $freinAv): static
{
$this->freinAv = $freinAv;
return $this;
}
public function getImageFile(): ?array
{
return $this->imageFile;
}
public function setImageFile(?array $imageFile): static
{
$this->imageFile = $imageFile;
return $this;
}
public function getClientSignature(): ?string
{
return $this->clientSignature;
}
public function setClientSignature(?string $clientSignature): static
{
$this->clientSignature = $clientSignature;
return $this;
}
public function getCommercialSignature(): ?string
{
return $this->commercialSignature;
}
public function setCommercialSignature(?string $commercialSignature): static
{
$this->commercialSignature = $commercialSignature;
return $this;
}
public function getNomCommercial(): ?string
{
return $this->nomCommercial;
}
public function setNomCommercial(?string $nomCommercial): static
{
$this->nomCommercial = $nomCommercial;
return $this;
}
public function getDateArrivee(): ?\DateTimeInterface
{
return $this->dateArrivee;
}
public function setDateArrivee(?\DateTimeInterface $dateArrivee): static
{
$this->dateArrivee = $dateArrivee;
return $this;
}
public function getCalendrier(): ?Calendrier
{
return $this->calendrier;
}
public function setCalendrier(?Calendrier $calendrier): static
{
$this->calendrier = $calendrier;
return $this;
}
public function isIsEtatEntre(): ?bool
{
return $this->isEtatEntre;
}
public function setIsEtatEntre(bool $isEtatEntre): static
{
$this->isEtatEntre = $isEtatEntre;
return $this;
}
/**
* @return Collection<int, Traveaux>
*/
public function getTraveauxes(): Collection
{
return $this->traveauxes;
}
public function addTraveaux(Traveaux $traveaux): static
{
if (!$this->traveauxes->contains($traveaux)) {
$this->traveauxes->add($traveaux);
$traveaux->setJobCard($this);
}
return $this;
}
public function removeTraveaux(Traveaux $traveaux): static
{
if ($this->traveauxes->removeElement($traveaux)) {
// set the owning side to null (unless already changed)
if ($traveaux->getJobCard() === $this) {
$traveaux->setJobCard(null);
}
}
return $this;
}
/**
* @return Collection<int, Devis>
*/
public function getDevis(): Collection
{
return $this->devis;
}
public function addDevi(Devis $devi): static
{
if (!$this->devis->contains($devi)) {
$this->devis->add($devi);
$devi->setJobCard($this);
}
return $this;
}
public function removeDevi(Devis $devi): static
{
if ($this->devis->removeElement($devi)) {
// set the owning side to null (unless already changed)
if ($devi->getJobCard() === $this) {
$devi->setJobCard(null);
}
}
return $this;
}
}