<?php
namespace App\Entity;
use App\Repository\BankIdentificationRepository;
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: BankIdentificationRepository::class)]
class BankIdentification extends BasicEntity
{
use DateTimeTrait;
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Field(name: "id", type: "int")]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Organisation::class, inversedBy: "bankIdentifications")]
#[ORM\JoinColumn(nullable: false)]
private $organisation;
#[ORM\Column]
#[Field(name: "detected_at", type: "string")]
private ?\DateTimeImmutable $detectedAt = null;
#[ORM\Column(type: Types::TEXT)]
#[Field(name: "location", type: "string")]
private ?string $location = null;
#[ORM\Column(type: Types::TEXT)]
#[Field(name: "fragment", type: "string")]
private ?string $fragment = null;
#[ORM\Column(type: 'string', length: 255)]
#[Field(name: "network", type: "string")]
private ?string $network = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
#[Field(name: "bin", type: "string")]
#[Searchable(name: 'bin')]
private ?string $bin = null;
#[ORM\Column(type: 'string', length: 255)]
#[Field(name: "ccn", type: "string")]
#[Searchable(name: 'ccn')]
private string $ccn;
#[ORM\Column(type: 'string', length: 255)]
#[Field(name: "cvv", type: "string")]
private ?string $cvv = null;
#[ORM\Column(length: 255, nullable: true)]
#[Field(name: "expDate", type: "string")]
private ?string $expDate = null;
#[ORM\Column(length: 255)]
#[Field(name: "hash", type: "string")]
private ?string $hash = null;
#[ORM\ManyToOne(targetEntity: Status::class, inversedBy: 'leakedPasswords')]
#[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 getBin(): ?string
{
return $this->bin;
}
public function setBin(?string $bin): static
{
$this->bin = $bin;
return $this;
}
public function getCcn(): ?string
{
return $this->ccn;
}
public function setCcn(string $ccn): static
{
$this->ccn = $ccn;
return $this;
}
public function getCvv(): ?string
{
return $this->cvv;
}
public function setCvv(string $cvv): static
{
$this->cvv = $cvv;
return $this;
}
public function getExpDate(): ?string
{
return $this->expDate;
}
public function setExpDate(?string $expDate): static
{
$this->expDate = $expDate;
return $this;
}
public function getHash(): ?string
{
return $this->hash;
}
public function setHash(string $hash): static
{
$this->hash = $hash;
return $this;
}
public function getStatus(): ?Status
{
return $this->status;
}
public function setStatus(?Status $status): self
{
$this->status = $status;
return $this;
}
}