src/Entity/ModuleType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ModuleTypeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassModuleTypeRepository::class)]
  8. class ModuleType
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'string'length255)]
  15.     private $name;
  16.     #[ORM\Column(type'bigint'nullabletrue)]
  17.     private $cfidParent;
  18.     #[ORM\Column(type'bigint')]
  19.     private $idSellsy;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private $parentName;
  22.     #[ORM\Column(type'string'length255)]
  23.     private $typeField;
  24.     #[ORM\ManyToMany(targetEntityAccountingFirm::class, mappedBy'moduleTypes')]
  25.     private $accountingFirms;
  26.     #[ORM\OneToMany(mappedBy'moduleType'targetEntityModuleTypeValue::class)]
  27.     private $moduleTypeValues;
  28.     public function __construct()
  29.     {
  30.         $this->accountingFirms = new ArrayCollection();
  31.         $this->moduleTypeValues = new ArrayCollection();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getName(): ?string
  38.     {
  39.         return $this->name;
  40.     }
  41.     public function setName(string $name): self
  42.     {
  43.         $this->name $name;
  44.         return $this;
  45.     }
  46.     public function getCfidParent(): ?string
  47.     {
  48.         return $this->cfidParent;
  49.     }
  50.     public function setCfidParent(?string $cfidParent): self
  51.     {
  52.         $this->cfidParent $cfidParent;
  53.         return $this;
  54.     }
  55.     public function getIdSellsy(): ?string
  56.     {
  57.         return $this->idSellsy;
  58.     }
  59.     public function setIdSellsy(string $idSellsy): self
  60.     {
  61.         $this->idSellsy $idSellsy;
  62.         return $this;
  63.     }
  64.     public function getParentName(): ?string
  65.     {
  66.         return $this->parentName;
  67.     }
  68.     public function setParentName(?string $parentName): self
  69.     {
  70.         $this->parentName $parentName;
  71.         return $this;
  72.     }
  73.     public function getTypeField(): ?string
  74.     {
  75.         return $this->typeField;
  76.     }
  77.     public function setTypeField(string $typeField): self
  78.     {
  79.         $this->typeField $typeField;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return Collection<int, AccountingFirm>
  84.      */
  85.     public function getAccountingFirms(): Collection
  86.     {
  87.         return $this->accountingFirms;
  88.     }
  89.     public function addAccountingFirm(AccountingFirm $accountingFirm): self
  90.     {
  91.         if (!$this->accountingFirms->contains($accountingFirm)) {
  92.             $this->accountingFirms[] = $accountingFirm;
  93.             $accountingFirm->addModuleType($this);
  94.         }
  95.         return $this;
  96.     }
  97.     public function removeAccountingFirm(AccountingFirm $accountingFirm): self
  98.     {
  99.         if ($this->accountingFirms->removeElement($accountingFirm)) {
  100.             $accountingFirm->removeModuleType($this);
  101.         }
  102.         return $this;
  103.     }
  104.     /**
  105.      * @return Collection<int, ModuleTypeValue>
  106.      */
  107.     public function getModuleTypeValues(): Collection
  108.     {
  109.         return $this->moduleTypeValues;
  110.     }
  111.     public function addModuleTypeValue(ModuleTypeValue $moduleTypeValue): self
  112.     {
  113.         if (!$this->moduleTypeValues->contains($moduleTypeValue)) {
  114.             $this->moduleTypeValues[] = $moduleTypeValue;
  115.             $moduleTypeValue->setModuleType($this);
  116.         }
  117.         return $this;
  118.     }
  119.     public function removeModuleTypeValue(ModuleTypeValue $moduleTypeValue): self
  120.     {
  121.         if ($this->moduleTypeValues->removeElement($moduleTypeValue)) {
  122.             // set the owning side to null (unless already changed)
  123.             if ($moduleTypeValue->getModuleType() === $this) {
  124.                 $moduleTypeValue->setModuleType(null);
  125.             }
  126.         }
  127.         return $this;
  128.     }
  129. }