<?phpnamespace App\Entity;use App\Repository\ModeleRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ModeleRepository::class) */class Modele{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=50) */ private $mdl_libele; /** * @ORM\ManyToOne(targetEntity=Marque::class, inversedBy="modeles") * @ORM\JoinColumn(nullable=false) */ private $code_marque; /** * @ORM\OneToMany(targetEntity=RendezVousVehicule::class, mappedBy="modele") */ private $rendezVousVehicules; /** * @ORM\Column(type="string", length=255) */ private $id_old; /** * @ORM\Column(type="integer", nullable=true) */ private $mdl_ordre; public function __construct() { $this->rendezVousVehicules = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getMdlLibele(): ?string { return $this->mdl_libele; } public function setMdlLibele(string $mdl_libele): self { $this->mdl_libele = $mdl_libele; return $this; } public function getCodeMarque(): ?Marque { return $this->code_marque; } public function setCodeMarque(?Marque $code_marque): self { $this->code_marque = $code_marque; return $this; } /** * @return Collection<int, RendezVousVehicule> */ public function getRendezVousVehicules(): Collection { return $this->rendezVousVehicules; } public function addRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self { if (!$this->rendezVousVehicules->contains($rendezVousVehicule)) { $this->rendezVousVehicules[] = $rendezVousVehicule; $rendezVousVehicule->setModele($this); } return $this; } public function removeRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self { if ($this->rendezVousVehicules->removeElement($rendezVousVehicule)) { // set the owning side to null (unless already changed) if ($rendezVousVehicule->getModele() === $this) { $rendezVousVehicule->setModele(null); } } return $this; } public function getIdOld(): ?string { return $this->id_old; } public function setIdOld(string $id_old): self { $this->id_old = $id_old; return $this; } public function getMdlOrdre(): ?int { return $this->mdl_ordre; } public function setMdlOrdre(?int $mdl_ordre): self { $this->mdl_ordre = $mdl_ordre; return $this; }}