src/Entity/LeakDownload.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LeakDownloadRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Overblog\GraphQLBundle\Annotation\Field;
  6. #[ORM\Entity(repositoryClassLeakDownloadRepository::class)]
  7. class LeakDownload extends BasicEntity
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     #[Field(name"id"type"int")]
  13.     private $id;
  14.     #[ORM\Column(type'text')]
  15.     #[Field(name"url"type"string")]
  16.     private $url;
  17.     #[ORM\ManyToOne(targetEntityLeakInfo::class, inversedBy'downloadLocations')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private $leakInfo;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getUrl(): ?string
  25.     {
  26.         return $this->url;
  27.     }
  28.     public function setUrl(string $url): self
  29.     {
  30.         $this->url $url;
  31.         return $this;
  32.     }
  33.     public function getLeakInfo(): ?LeakInfo
  34.     {
  35.         return $this->leakInfo;
  36.     }
  37.     public function setLeakInfo(?LeakInfo $leakInfo): self
  38.     {
  39.         $this->leakInfo $leakInfo;
  40.         return $this;
  41.     }
  42.     public function __toString()
  43.     {
  44.         return $this->getUrl();
  45.     }
  46. }