src/Entity/CategorieArticle.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CategorieArticleRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCategorieArticleRepository::class)]
  8. class CategorieArticle
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $code;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $name;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private $complement;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private $traitement_special;
  22.     #[ORM\ManyToMany(targetEntityCategorieFamille::class, inversedBy'categorieArticles')]
  23.     private $categoriefamilles;
  24.     public function __construct()
  25.     {
  26.         $this->categoriefamilles = new ArrayCollection();
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getCode(): ?string
  33.     {
  34.         return $this->code;
  35.     }
  36.     public function setCode(?string $code): self
  37.     {
  38.         $this->code $code;
  39.         return $this;
  40.     }
  41.     public function getName(): ?string
  42.     {
  43.         return $this->name;
  44.     }
  45.     public function setName(?string $name): self
  46.     {
  47.         $this->name $name;
  48.         return $this;
  49.     }
  50.     public function getComplement(): ?string
  51.     {
  52.         return $this->complement;
  53.     }
  54.     public function setComplement(?string $complement): self
  55.     {
  56.         $this->complement $complement;
  57.         return $this;
  58.     }
  59.     public function getTraitementSpecial(): ?string
  60.     {
  61.         return $this->traitement_special;
  62.     }
  63.     public function setTraitementSpecial(?string $traitement_special): self
  64.     {
  65.         $this->traitement_special $traitement_special;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return Collection|CategorieFamille[]
  70.      */
  71.     public function getCategoriefamilles(): Collection
  72.     {
  73.         return $this->categoriefamilles;
  74.     }
  75.     public function addCategoriefamille(CategorieFamille $categoriefamille): self
  76.     {
  77.         if (!$this->categoriefamilles->contains($categoriefamille)) {
  78.             $this->categoriefamilles[] = $categoriefamille;
  79.         }
  80.         return $this;
  81.     }
  82.     public function removeCategoriefamille(CategorieFamille $categoriefamille): self
  83.     {
  84.         $this->categoriefamilles->removeElement($categoriefamille);
  85.         return $this;
  86.     }
  87. }