<?php
namespace App\Entity;
use App\Repository\LeakActorRepository;
use Doctrine\ORM\Mapping as ORM;
use Overblog\GraphQLBundle\Annotation\Field;
#[ORM\Entity(repositoryClass: LeakActorRepository::class)]
class LeakActor extends BasicEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: "integer")]
#[Field(name: "id", type: "int")]
private $id;
#[ORM\Column(type: "string", length: 255)]
#[Field(name: "name", type: "string")]
private $name;
#[ORM\ManyToOne(targetEntity: LeakInfo::class, inversedBy: "leakActors")]
#[ORM\JoinColumn(nullable: false)]
private $leakInfo;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
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->getName();
}
}