src/Entity/Remorque.php line 12
<?phpnamespace App\Entity;use App\Repository\RemorqueRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: RemorqueRepository::class)]class Remorque{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 50)]private ?string $nom = null;#[ORM\Column]private ?int $actif = null;#[ORM\Column(length: 50)]private ?string $numero = null;#[ORM\OneToMany(mappedBy: 'remorque', targetEntity: Maintenance::class)]private Collection $maintenances;#[ORM\Column(length: 50)]private ?string $marque = null;#[ORM\Column]private ?int $genre = null;#[ORM\Column(length: 50)]private ?string $cat = null;#[ORM\OneToMany(mappedBy: 'Remorque', targetEntity: Facture::class)]private Collection $factures;#[ORM\ManyToOne(inversedBy: 'remorques')]private ?SystemeClient $systemeClient = null;#[ORM\Column(length: 100)]private ?string $referenceMoteur = null;#[ORM\Column(type: Types::DATE_MUTABLE)]private ?\DateTimeInterface $dateImmat = null;#[ORM\Column]private ?int $dureeEntretien = null;#[ORM\OneToMany(mappedBy: 'remorque', targetEntity: PlanningRemorque::class)]private Collection $planningRemorques;#[ORM\Column]private ?int $nbrEssieux = null;#[ORM\OneToMany(mappedBy: 'remorque', targetEntity: PneuVehicule::class)]private Collection $pneuVehicules;#[ORM\ManyToOne(inversedBy: 'constructeur')]private ?Constructeur $constructeur = null;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?\DateTimeInterface $finContratConstructeur = null;public function __construct(){$this->maintenances = new ArrayCollection();$this->factures = new ArrayCollection();$this->planningRemorques = new ArrayCollection();$this->pneuVehicules = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getNom(): ?string{return $this->nom;}public function setNom(string $nom): self{$this->nom = $nom;return $this;}/*** @return Collection<int, Maintenance>*/public function getMaintenances(): Collection{return $this->maintenances;}public function addMaintenance(Maintenance $maintenance): self{if (!$this->maintenances->contains($maintenance)) {$this->maintenances->add($maintenance);$maintenance->setRemorque($this);}return $this;}public function removeMaintenance(Maintenance $maintenance): self{if ($this->maintenances->removeElement($maintenance)) {// set the owning side to null (unless already changed)if ($maintenance->getRemorque() === $this) {$maintenance->setRemorque(null);}}return $this;}public function getActif(): ?int{return $this->actif;}public function setActif(int $actif): self{$this->actif = $actif;return $this;}public function getNumero(): ?string{return $this->numero;}public function setNumero(string $numero): self{$this->numero = $numero;return $this;}public function getMarque(): ?string{return $this->marque;}public function setMarque(string $marque): self{$this->marque = $marque;return $this;}public function getGenre(): ?int{return $this->genre;}public function setGenre(int $genre): self{$this->genre = $genre;return $this;}public function getCat(): ?string{return $this->cat;}public function setCat(string $cat): self{$this->cat = $cat;return $this;}public function __toString(){return $this->getNumero().' ('.$this->getNom().')';}/*** @return Collection<int, Facture>*/public function getFactures(): Collection{return $this->factures;}public function addFacture(Facture $facture): self{if (!$this->factures->contains($facture)) {$this->factures->add($facture);$facture->setRemorque($this);}return $this;}public function removeFacture(Facture $facture): self{if ($this->factures->removeElement($facture)) {// set the owning side to null (unless already changed)if ($facture->getRemorque() === $this) {$facture->setRemorque(null);}}return $this;}public function getSystemeClient(): ?SystemeClient{return $this->systemeClient;}public function setSystemeClient(?SystemeClient $systemeClient): self{$this->systemeClient = $systemeClient;return $this;}public function getReferenceMoteur(): ?string{return $this->referenceMoteur;}public function setReferenceMoteur(string $referenceMoteur): self{$this->referenceMoteur = $referenceMoteur;return $this;}public function getDateImmat(): ?\DateTimeInterface{return $this->dateImmat;}public function setDateImmat(\DateTimeInterface $dateImmat): self{$this->dateImmat = $dateImmat;return $this;}public function getDureeEntretien(): ?int{return $this->dureeEntretien;}public function setDureeEntretien(int $dureeEntretien): self{$this->dureeEntretien = $dureeEntretien;return $this;}/*** @return Collection<int, PlanningRemorque>*/public function getPlanningRemorques(): Collection{return $this->planningRemorques;}public function addPlanningRemorque(PlanningRemorque $planningRemorque): self{if (!$this->planningRemorques->contains($planningRemorque)) {$this->planningRemorques->add($planningRemorque);$planningRemorque->setRemorque($this);}return $this;}public function removePlanningRemorque(PlanningRemorque $planningRemorque): self{if ($this->planningRemorques->removeElement($planningRemorque)) {// set the owning side to null (unless already changed)if ($planningRemorque->getRemorque() === $this) {$planningRemorque->setRemorque(null);}}return $this;}public function getNbrEssieux(): ?int{return $this->nbrEssieux;}public function setNbrEssieux(int $nbrEssieux): static{$this->nbrEssieux = $nbrEssieux;return $this;}/*** @return Collection<int, PneuVehicule>*/public function getPneuVehicules(): Collection{return $this->pneuVehicules;}public function addPneuVehicule(PneuVehicule $pneuVehicule): static{if (!$this->pneuVehicules->contains($pneuVehicule)) {$this->pneuVehicules->add($pneuVehicule);$pneuVehicule->setRemorque($this);}return $this;}public function removePneuVehicule(PneuVehicule $pneuVehicule): static{if ($this->pneuVehicules->removeElement($pneuVehicule)) {// set the owning side to null (unless already changed)if ($pneuVehicule->getRemorque() === $this) {$pneuVehicule->setRemorque(null);}}return $this;}public function getConstructeur(): ?Constructeur{return $this->constructeur;}public function setConstructeur(?Constructeur $constructeur): static{$this->constructeur = $constructeur;return $this;}public function getFinContratConstructeur(): ?\DateTimeInterface{return $this->finContratConstructeur;}public function setFinContratConstructeur(?\DateTimeInterface $finContratConstructeur): self{$this->finContratConstructeur = $finContratConstructeur;return $this;}}