<?phpnamespace App\Entity;use App\Repository\ModuleTypeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ModuleTypeRepository::class)]class ModuleType{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255)] private $name; #[ORM\Column(type: 'bigint', nullable: true)] private $cfidParent; #[ORM\Column(type: 'bigint')] private $idSellsy; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $parentName; #[ORM\Column(type: 'string', length: 255)] private $typeField; #[ORM\ManyToMany(targetEntity: AccountingFirm::class, mappedBy: 'moduleTypes')] private $accountingFirms; #[ORM\OneToMany(mappedBy: 'moduleType', targetEntity: ModuleTypeValue::class)] private $moduleTypeValues; public function __construct() { $this->accountingFirms = new ArrayCollection(); $this->moduleTypeValues = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getCfidParent(): ?string { return $this->cfidParent; } public function setCfidParent(?string $cfidParent): self { $this->cfidParent = $cfidParent; return $this; } public function getIdSellsy(): ?string { return $this->idSellsy; } public function setIdSellsy(string $idSellsy): self { $this->idSellsy = $idSellsy; return $this; } public function getParentName(): ?string { return $this->parentName; } public function setParentName(?string $parentName): self { $this->parentName = $parentName; return $this; } public function getTypeField(): ?string { return $this->typeField; } public function setTypeField(string $typeField): self { $this->typeField = $typeField; return $this; } /** * @return Collection<int, AccountingFirm> */ public function getAccountingFirms(): Collection { return $this->accountingFirms; } public function addAccountingFirm(AccountingFirm $accountingFirm): self { if (!$this->accountingFirms->contains($accountingFirm)) { $this->accountingFirms[] = $accountingFirm; $accountingFirm->addModuleType($this); } return $this; } public function removeAccountingFirm(AccountingFirm $accountingFirm): self { if ($this->accountingFirms->removeElement($accountingFirm)) { $accountingFirm->removeModuleType($this); } return $this; } /** * @return Collection<int, ModuleTypeValue> */ public function getModuleTypeValues(): Collection { return $this->moduleTypeValues; } public function addModuleTypeValue(ModuleTypeValue $moduleTypeValue): self { if (!$this->moduleTypeValues->contains($moduleTypeValue)) { $this->moduleTypeValues[] = $moduleTypeValue; $moduleTypeValue->setModuleType($this); } return $this; } public function removeModuleTypeValue(ModuleTypeValue $moduleTypeValue): self { if ($this->moduleTypeValues->removeElement($moduleTypeValue)) { // set the owning side to null (unless already changed) if ($moduleTypeValue->getModuleType() === $this) { $moduleTypeValue->setModuleType(null); } } return $this; }}