src/Entity/MaintenanceType.php line 11
<?phpnamespace App\Entity;use App\Repository\MaintenanceTypeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: MaintenanceTypeRepository::class)]class MaintenanceType{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 50)]private ?string $intitule = null;#[ORM\OneToMany(mappedBy: 'type', targetEntity: Maintenance::class)]private Collection $maintenances;#[ORM\Column]private ?int $typeVehicule = null;#[ORM\OneToMany(mappedBy: 'maintenanceType', targetEntity: MaintenanceTypePeriodicite::class)]private Collection $maintenanceTypePeriodicites;#[ORM\ManyToOne(inversedBy: 'maintenanceTypes')]private ?SystemeClient $systemeClient = null;public function __construct(){$this->maintenances = new ArrayCollection();$this->maintenanceTypePeriodicites = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getIntitule(): ?string{return $this->intitule;}public function setIntitule(string $intitule): self{$this->intitule = $intitule;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->setType($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->getType() === $this) {$maintenance->setType(null);}}return $this;}public function __toString(){return $this->getIntitule();}public function getTypeVehicule(): ?int{return $this->typeVehicule;}public function setTypeVehicule(int $typeVehicule): self{$this->typeVehicule = $typeVehicule;return $this;}/*** @return Collection<int, MaintenanceTypePeriodicite>*/public function getMaintenanceTypePeriodicites(): Collection{return $this->maintenanceTypePeriodicites;}public function addMaintenanceTypePeriodicite(MaintenanceTypePeriodicite $maintenanceTypePeriodicite): self{if (!$this->maintenanceTypePeriodicites->contains($maintenanceTypePeriodicite)) {$this->maintenanceTypePeriodicites->add($maintenanceTypePeriodicite);$maintenanceTypePeriodicite->setMaintenanceType($this);}return $this;}public function removeMaintenanceTypePeriodicite(MaintenanceTypePeriodicite $maintenanceTypePeriodicite): self{if ($this->maintenanceTypePeriodicites->removeElement($maintenanceTypePeriodicite)) {// set the owning side to null (unless already changed)if ($maintenanceTypePeriodicite->getMaintenanceType() === $this) {$maintenanceTypePeriodicite->setMaintenanceType(null);}}return $this;}public function getSystemeClient(): ?SystemeClient{return $this->systemeClient;}public function setSystemeClient(?SystemeClient $systemeClient): static{$this->systemeClient = $systemeClient;return $this;}}