<?phpnamespace App\Entity;use App\Repository\IdentiteVisuelleCategoryRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: IdentiteVisuelleCategoryRepository::class)]class IdentiteVisuelleCategory{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $category; #[ORM\OneToMany(mappedBy: 'identiteVisuelleCategory', targetEntity: IdentiteVisuelleFile::class)] private $identiteVisuelleFiles; #[ORM\Column(type: 'string', length: 255)] private $name; #[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'identiteVisuelleCategories')] private $accountingFirm; public function __construct() { $this->identiteVisuelleFiles = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getCategory(): ?string { return $this->category; } public function setCategory(string $category): self { $this->category = $category; return $this; } /** * @return Collection<int, IdentiteVisuelleFile> */ public function getIdentiteVisuelleFiles(): Collection { return $this->identiteVisuelleFiles; } public function addIdentiteVisuelleFile(IdentiteVisuelleFile $identiteVisuelleFile): self { if (!$this->identiteVisuelleFiles->contains($identiteVisuelleFile)) { $this->identiteVisuelleFiles[] = $identiteVisuelleFile; $identiteVisuelleFile->setIdentiteVisuelleCategory($this); } return $this; } public function removeIdentiteVisuelleFile(IdentiteVisuelleFile $identiteVisuelleFile): self { if ($this->identiteVisuelleFiles->removeElement($identiteVisuelleFile)) { // set the owning side to null (unless already changed) if ($identiteVisuelleFile->getIdentiteVisuelleCategory() === $this) { $identiteVisuelleFile->setIdentiteVisuelleCategory(null); } } return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getAccountingFirm(): ?AccountingFirm { return $this->accountingFirm; } public function setAccountingFirm(?AccountingFirm $accountingFirm): self { $this->accountingFirm = $accountingFirm; return $this; }}