<?php
namespace App\Entity;
use App\Repository\LeakDownloadRepository;
use Doctrine\ORM\Mapping as ORM;
use Overblog\GraphQLBundle\Annotation\Field;
#[ORM\Entity(repositoryClass: LeakDownloadRepository::class)]
class LeakDownload extends BasicEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
#[Field(name: "id", type: "int")]
private $id;
#[ORM\Column(type: 'text')]
#[Field(name: "url", type: "string")]
private $url;
#[ORM\ManyToOne(targetEntity: LeakInfo::class, inversedBy: 'downloadLocations')]
#[ORM\JoinColumn(nullable: false)]
private $leakInfo;
public function getId(): ?int
{
return $this->id;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(string $url): self
{
$this->url = $url;
return $this;
}
public function getLeakInfo(): ?LeakInfo
{
return $this->leakInfo;
}
public function setLeakInfo(?LeakInfo $leakInfo): self
{
$this->leakInfo = $leakInfo;
return $this;
}
public function __toString()
{
return $this->getUrl();
}
}