src/Entity/IdentiteVisuelleCategory.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\IdentiteVisuelleCategoryRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassIdentiteVisuelleCategoryRepository::class)]
  8. class IdentiteVisuelleCategory
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $category;
  16.     #[ORM\OneToMany(mappedBy'identiteVisuelleCategory'targetEntityIdentiteVisuelleFile::class)]
  17.     private $identiteVisuelleFiles;
  18.     #[ORM\Column(type'string'length255)]
  19.     private $name;
  20.     #[ORM\ManyToOne(targetEntityAccountingFirm::class, inversedBy'identiteVisuelleCategories')]
  21.     private $accountingFirm;
  22.     public function __construct()
  23.     {
  24.         $this->identiteVisuelleFiles = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getCategory(): ?string
  31.     {
  32.         return $this->category;
  33.     }
  34.     public function setCategory(string $category): self
  35.     {
  36.         $this->category $category;
  37.         return $this;
  38.     }
  39.     /**
  40.      * @return Collection<int, IdentiteVisuelleFile>
  41.      */
  42.     public function getIdentiteVisuelleFiles(): Collection
  43.     {
  44.         return $this->identiteVisuelleFiles;
  45.     }
  46.     public function addIdentiteVisuelleFile(IdentiteVisuelleFile $identiteVisuelleFile): self
  47.     {
  48.         if (!$this->identiteVisuelleFiles->contains($identiteVisuelleFile)) {
  49.             $this->identiteVisuelleFiles[] = $identiteVisuelleFile;
  50.             $identiteVisuelleFile->setIdentiteVisuelleCategory($this);
  51.         }
  52.         return $this;
  53.     }
  54.     public function removeIdentiteVisuelleFile(IdentiteVisuelleFile $identiteVisuelleFile): self
  55.     {
  56.         if ($this->identiteVisuelleFiles->removeElement($identiteVisuelleFile)) {
  57.             // set the owning side to null (unless already changed)
  58.             if ($identiteVisuelleFile->getIdentiteVisuelleCategory() === $this) {
  59.                 $identiteVisuelleFile->setIdentiteVisuelleCategory(null);
  60.             }
  61.         }
  62.         return $this;
  63.     }
  64.     public function getName(): ?string
  65.     {
  66.         return $this->name;
  67.     }
  68.     public function setName(string $name): self
  69.     {
  70.         $this->name $name;
  71.         return $this;
  72.     }
  73.     public function getAccountingFirm(): ?AccountingFirm
  74.     {
  75.         return $this->accountingFirm;
  76.     }
  77.     public function setAccountingFirm(?AccountingFirm $accountingFirm): self
  78.     {
  79.         $this->accountingFirm $accountingFirm;
  80.         return $this;
  81.     }
  82. }