src/Entity/ExternalDataBase.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ExternalDataBaseRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ExternalDataBaseRepository::class)
  9.  */
  10. class ExternalDataBase
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $coordinatorMapping;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $operatorMapping;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $promoterMapping;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $promotedMapping;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=Person::class, mappedBy="externalDB")
  40.      */
  41.     private $people;
  42.     public function __construct()
  43.     {
  44.         $this->people = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getName(): ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(string $name): self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getCoordinatorMapping(): ?string
  60.     {
  61.         return $this->coordinatorMapping;
  62.     }
  63.     public function setCoordinatorMapping(?string $coordinatorMapping): self
  64.     {
  65.         $this->coordinatorMapping $coordinatorMapping;
  66.         return $this;
  67.     }
  68.     public function getOperatorMapping(): ?string
  69.     {
  70.         return $this->operatorMapping;
  71.     }
  72.     public function setOperatorMapping(?string $operatorMapping): self
  73.     {
  74.         $this->operatorMapping $operatorMapping;
  75.         return $this;
  76.     }
  77.     public function getPromoterMapping(): ?string
  78.     {
  79.         return $this->promoterMapping;
  80.     }
  81.     public function setPromoterMapping(?string $promoterMapping): self
  82.     {
  83.         $this->promoterMapping $promoterMapping;
  84.         return $this;
  85.     }
  86.     public function getPromotedMapping(): ?string
  87.     {
  88.         return $this->promotedMapping;
  89.     }
  90.     public function setPromotedMapping(?string $promotedMapping): self
  91.     {
  92.         $this->promotedMapping $promotedMapping;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection<int, Person>
  97.      */
  98.     public function getPeople(): Collection
  99.     {
  100.         return $this->people;
  101.     }
  102.     public function addPerson(Person $person): self
  103.     {
  104.         if (!$this->people->contains($person)) {
  105.             $this->people[] = $person;
  106.             $person->setExternalDB($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removePerson(Person $person): self
  111.     {
  112.         if ($this->people->removeElement($person)) {
  113.             // set the owning side to null (unless already changed)
  114.             if ($person->getExternalDB() === $this) {
  115.                 $person->setExternalDB(null);
  116.             }
  117.         }
  118.         return $this;
  119.     }
  120. }