<?phpnamespace App\Entity;use App\Repository\DevisCategorieRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: DevisCategorieRepository::class)]class DevisCategorie{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 500, nullable: true)] private ?string $nom = null; #[ORM\Column(length: 255, nullable: true)] private ?string $reference = null; #[ORM\Column(nullable: true)] private ?bool $statut = null; #[ORM\OneToMany(targetEntity: DevisSection::class, mappedBy: 'categorie')] private Collection $devisSections; public function __construct() { $this->devisSections = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getNom(): ?string { return $this->nom; } public function setNom(?string $nom): static { $this->nom = $nom; return $this; } public function getReference(): ?string { return $this->reference; } public function setReference(?string $reference): static { $this->reference = $reference; return $this; } public function isStatut(): ?bool { return $this->statut; } public function setStatut(?bool $statut): static { $this->statut = $statut; return $this; } /** * @return Collection<int, DevisSection> */ public function getDevisSections(): Collection { return $this->devisSections; } public function addDevisSection(DevisSection $devisSection): static { if (!$this->devisSections->contains($devisSection)) { $this->devisSections->add($devisSection); $devisSection->setCategorie($this); } return $this; } public function removeDevisSection(DevisSection $devisSection): static { if ($this->devisSections->removeElement($devisSection)) { // set the owning side to null (unless already changed) if ($devisSection->getCategorie() === $this) { $devisSection->setCategorie(null); } } return $this; }}