<?php
namespace App\Entity;
use App\Repository\LeakedIpRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Traits\DateTimeTrait;
use Overblog\GraphQLBundle\Annotation\Field;
use App\Attribute\Searchable;
#[ORM\Entity(repositoryClass: LeakedIpRepository::class)]
class LeakedIp extends BasicEntity
{
use DateTimeTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Organisation::class, inversedBy: "leakedIps")]
#[ORM\JoinColumn(nullable: false)]
private $organisation;
#[ORM\Column]
private ?\DateTimeImmutable $detectedAt = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $location = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $fragment = null;
#[ORM\Column(type: 'string', length: 255)]
private ?string $network = null;
#[ORM\Column(type: 'string', length: 255)]
#[Field(name: "address", type: "string")]
#[Searchable(name: 'address')]
private ?string $address = null;
#[ORM\ManyToOne(targetEntity: Status::class, inversedBy: 'cryptocurrencys')]
#[ORM\JoinColumn(nullable: true, options: ['default' => 1])]
#[Field(name: "status")]
private $status;
public function getId(): ?int
{
return $this->id;
}
public function getOrganisation(): ?Organisation
{
return $this->organisation;
}
public function setOrganisation(?Organisation $organisation): self
{
$this->organisation = $organisation;
return $this;
}
public function getDetectedAt(): ?\DateTimeImmutable
{
return $this->detectedAt;
}
public function setDetectedAt(\DateTimeImmutable $detectedAt): static
{
$this->detectedAt = $detectedAt;
return $this;
}
public function getLocation(): ?string
{
return $this->location;
}
public function setLocation(string $location): static
{
$this->location = $location;
return $this;
}
public function getFragment(): ?string
{
return $this->fragment;
}
public function setFragment(string $fragment): static
{
$this->fragment = $fragment;
return $this;
}
public function getNetwork(): ?string
{
return $this->network;
}
public function setNetwork(string $network): static
{
$this->network = $network;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): static
{
$this->address = $address;
return $this;
}
public function getStatus(): ?Status
{
return $this->status;
}
public function setStatus(?Status $status): self
{
$this->status = $status;
return $this;
}
}