src/Entity/LeakInfo.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LeakInfoRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Overblog\GraphQLBundle\Annotation\Field;
  8. #[ORM\Entity(repositoryClassLeakInfoRepository::class)]
  9. class LeakInfo extends BasicEntity
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type"integer")]
  14.     #[Field(name"id"type"int")]
  15.     private $id;
  16.     #[ORM\Column(type"string"length255)]
  17.     #[Field(name"name"type"string")]
  18.     private $name;
  19.     #[ORM\Column(type"string"length255)]
  20.     #[Field(name"host"type"string")]
  21.     private $host;
  22.     #[ORM\Column(type"text"nullabletrue)]
  23.     #[Field(name"file_path"type"string")]
  24.     private $filePath;
  25.     #[ORM\Column(type"text"nullabletrue)]
  26.     #[Field(name"file_name"type"string")]
  27.     private $fileName;
  28.     #[ORM\OneToMany(mappedBy"leakInfo"targetEntityLeakActor::class, cascade: ["persist"], orphanRemovaltrue)]
  29.     #[Field(name"leak_actors")]
  30.     private $leakActors;
  31.     #[ORM\OneToMany(mappedBy"leakInfo"targetEntityLeakAssociation::class, cascade: ["persist"], orphanRemovaltrue)]
  32.     #[Field(name"leak_associations")]
  33.     private $leakAssociations;
  34.     #[ORM\OneToMany(mappedBy"leakInfo"targetEntityLeakDownload::class, cascade: ["persist"], orphanRemovaltrue)]
  35.     #[Field(name"download_locations")]
  36.     private $downloadLocations;
  37.     public function __construct()
  38.     {
  39.         $this->leakActors = new ArrayCollection();
  40.         $this->leakAssociations = new ArrayCollection();
  41.         $this->downloadLocations = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getName(): ?string
  48.     {
  49.         return $this->name;
  50.     }
  51.     public function setName(string $name): self
  52.     {
  53.         $this->name $name;
  54.         return $this;
  55.     }
  56.     public function getHost(): ?string
  57.     {
  58.         return $this->host;
  59.     }
  60.     public function setHost(string $host): self
  61.     {
  62.         $this->host $host;
  63.         return $this;
  64.     }
  65.     public function getFilePath(): ?string
  66.     {
  67.         return $this->filePath;
  68.     }
  69.     public function setFilePath(?string $filePath): self
  70.     {
  71.         $this->filePath $filePath;
  72.         return $this;
  73.     }
  74.     public function getFileName(): ?string
  75.     {
  76.         return $this->fileName;
  77.     }
  78.     public function setFileName(?string $fileName): self
  79.     {
  80.         $this->fileName $fileName;
  81.         return $this;
  82.     }
  83.     /**
  84.      * @return Collection<int, LeakActor>
  85.      */
  86.     public function getLeakActors(): Collection
  87.     {
  88.         return $this->leakActors;
  89.     }
  90.     public function addLeakActor(LeakActor $leakActor): self
  91.     {
  92.         if (!$this->leakActors->contains($leakActor)) {
  93.             $this->leakActors[] = $leakActor;
  94.             $leakActor->setLeakInfo($this);
  95.         }
  96.         return $this;
  97.     }
  98.     public function removeLeakActor(LeakActor $leakActor): self
  99.     {
  100.         if ($this->leakActors->removeElement($leakActor)) {
  101.             // set the owning side to null (unless already changed)
  102.             if ($leakActor->getLeakInfo() === $this) {
  103.                 $leakActor->setLeakInfo(null);
  104.             }
  105.         }
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return Collection<int, LeakAssociation>
  110.      */
  111.     public function getLeakAssociations(): Collection
  112.     {
  113.         return $this->leakAssociations;
  114.     }
  115.     public function addLeakAssociation(LeakAssociation $leakAssociation): self
  116.     {
  117.         if (!$this->leakAssociations->contains($leakAssociation)) {
  118.             $this->leakAssociations[] = $leakAssociation;
  119.             $leakAssociation->setLeakInfo($this);
  120.         }
  121.         return $this;
  122.     }
  123.     public function removeLeakAssociation(LeakAssociation $leakAssociation): self
  124.     {
  125.         if ($this->leakAssociations->removeElement($leakAssociation)) {
  126.             // set the owning side to null (unless already changed)
  127.             if ($leakAssociation->getLeakInfo() === $this) {
  128.                 $leakAssociation->setLeakInfo(null);
  129.             }
  130.         }
  131.         return $this;
  132.     }
  133.     /**
  134.      * @return Collection<int, LeakDownload>
  135.      */
  136.     public function getDownloadLocations(): Collection
  137.     {
  138.         return $this->downloadLocations;
  139.     }
  140.     public function addDownloadLocation(LeakDownload $downloadLocation): self
  141.     {
  142.         if (!$this->downloadLocations->contains($downloadLocation)) {
  143.             $this->downloadLocations[] = $downloadLocation;
  144.             $downloadLocation->setLeakInfo($this);
  145.         }
  146.         return $this;
  147.     }
  148.     public function removeDownloadLocation(LeakDownload $downloadLocation): self
  149.     {
  150.         if ($this->downloadLocations->removeElement($downloadLocation)) {
  151.             // set the owning side to null (unless already changed)
  152.             if ($downloadLocation->getLeakInfo() === $this) {
  153.                 $downloadLocation->setLeakInfo(null);
  154.             }
  155.         }
  156.         return $this;
  157.     }
  158. }