<?phpnamespace App\Entity;use App\Repository\CategorieArticleRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CategorieArticleRepository::class)]class CategorieArticle{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $code; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $name; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $complement; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $traitement_special; #[ORM\ManyToMany(targetEntity: CategorieFamille::class, inversedBy: 'categorieArticles')] private $categoriefamilles; public function __construct() { $this->categoriefamilles = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getCode(): ?string { return $this->code; } public function setCode(?string $code): self { $this->code = $code; return $this; } public function getName(): ?string { return $this->name; } public function setName(?string $name): self { $this->name = $name; return $this; } public function getComplement(): ?string { return $this->complement; } public function setComplement(?string $complement): self { $this->complement = $complement; return $this; } public function getTraitementSpecial(): ?string { return $this->traitement_special; } public function setTraitementSpecial(?string $traitement_special): self { $this->traitement_special = $traitement_special; return $this; } /** * @return Collection|CategorieFamille[] */ public function getCategoriefamilles(): Collection { return $this->categoriefamilles; } public function addCategoriefamille(CategorieFamille $categoriefamille): self { if (!$this->categoriefamilles->contains($categoriefamille)) { $this->categoriefamilles[] = $categoriefamille; } return $this; } public function removeCategoriefamille(CategorieFamille $categoriefamille): self { $this->categoriefamilles->removeElement($categoriefamille); return $this; }}