src/Entity/LeakedPassword.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Attribute\Searchable;
  4. use App\Repository\LeakedPasswordRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Overblog\GraphQLBundle\Annotation\Field;
  8. use DateTimeImmutable;
  9. #[ORM\Entity(repositoryClassLeakedPasswordRepository::class)]
  10. class LeakedPassword extends BasicEntity
  11. {
  12.     public const TYPE_CLEAR 'C';
  13.     public const TYPE_EMPTY 'E';
  14.     public const TYPE_HASHED 'H';
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column(type'integer')]
  18.     #[Field(name"id"type"int")]
  19.     private $id;
  20.     #[ORM\Column(type'string'length255)]
  21.     #[Field(name"email"type"string")]
  22.     #[Searchable(name'email')]
  23.     private $email;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     #[Field(name"password"type"string")]
  26.     #[Searchable(name'password')]
  27.     private $password;
  28.     #[ORM\Column(type'string'length255)]
  29.     #[Field(name"uuid"type"string")]
  30.     #[Searchable(name'uuid')]
  31.     private $uuid;
  32.     #[ORM\Column(type'datetime_immutable')]
  33.     #[Field(name"detected_at"type"string")]
  34.     private $detectedAt;
  35.     #[ORM\Column(type'boolean')]
  36.     #[Field(name"is_notified"type"boolean")]
  37.     private $isNotified;
  38.     #[ORM\ManyToOne(targetEntityOrganisation::class, inversedBy'leakedPasswords')]
  39.     #[ORM\JoinColumn(nullablefalse)]
  40.     private $organisation;
  41.     #[ORM\ManyToOne(targetEntityStatus::class, inversedBy'leakedPasswords')]
  42.     #[ORM\JoinColumn(nullabletrueoptions: ['default' => 1])]
  43.     #[Field(name"status")]
  44.     private $status;
  45.     #[ORM\Column(type'datetime_immutable'nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  46.     #[Field(name"created_at"type"string")]
  47.     private $createdAt;
  48.     #[ORM\Column(type'string'length255)]
  49.     #[Field(name"source"type"string")]
  50.     #[Searchable(name'source')]
  51.     private $source;
  52.     #[ORM\ManyToOne(inversedBy'leakedPasswords')]
  53.     #[Field(name"domain")]
  54.     private ?Domain $domain null;
  55.     #[ORM\Column(length1)]
  56.     #[Field(name"type"type"string")]
  57.     #[Searchable(name'type')]
  58.     private ?string $type self::TYPE_CLEAR;
  59.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  60.     private ?string $location null;
  61.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  62.     #[Field(name"fragment"type"string")]
  63.     #[Searchable(name'fragment')]
  64.     private ?string $fragment null;
  65.     #[ORM\Column(type'string'length255nullabletrue)]
  66.     private ?string $network null;
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getEmail(): ?string
  72.     {
  73.         return $this->email;
  74.     }
  75.     public function setEmail(string $email): self
  76.     {
  77.         $this->email $email;
  78.         return $this;
  79.     }
  80.     public function getPassword(): ?string
  81.     {
  82.         return $this->password;
  83.     }
  84.     public function setPassword(?string $password): self
  85.     {
  86.         $this->password $password;
  87.         return $this;
  88.     }
  89.     public function getUuid(): ?string
  90.     {
  91.         return $this->uuid;
  92.     }
  93.     public function setUuid(string $uuid): self
  94.     {
  95.         $this->uuid $uuid;
  96.         return $this;
  97.     }
  98.     public function getDetectedAt(): ?\DateTimeImmutable
  99.     {
  100.         return $this->detectedAt;
  101.     }
  102.     public function setDetectedAt(\DateTimeImmutable $detectedAt): self
  103.     {
  104.         $this->detectedAt $detectedAt;
  105.         return $this;
  106.     }
  107.     public function getIsNotified(): ?bool
  108.     {
  109.         return $this->isNotified;
  110.     }
  111.     public function setIsNotified(bool $isNotified): self
  112.     {
  113.         $this->isNotified $isNotified;
  114.         return $this;
  115.     }
  116.     public function getOrganisation(): ?Organisation
  117.     {
  118.         return $this->organisation;
  119.     }
  120.     public function setOrganisation(?Organisation $organisation): self
  121.     {
  122.         $this->organisation $organisation;
  123.         return $this;
  124.     }
  125.     public function getStatus(): ?Status
  126.     {
  127.         return $this->status;
  128.     }
  129.     public function setStatus(?Status $status): self
  130.     {
  131.         $this->status $status;
  132.         return $this;
  133.     }
  134.     public function getCreatedAt(): ?\DateTimeImmutable
  135.     {
  136.         return $this->createdAt;
  137.     }
  138.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  139.     {
  140.         $this->createdAt $createdAt;
  141.         return $this;
  142.     }
  143.     public function getSource(): ?string
  144.     {
  145.         return $this->source;
  146.     }
  147.     public function setSource(string $source): self
  148.     {
  149.         $this->source $source;
  150.         return $this;
  151.     }
  152.     public function getDomain(): ?Domain
  153.     {
  154.         return $this->domain;
  155.     }
  156.     public function setDomain(?Domain $domain): static
  157.     {
  158.         $this->domain $domain;
  159.         return $this;
  160.     }
  161.     public function getType(): ?string
  162.     {
  163.         return $this->type;
  164.     }
  165.     public function setType(string $type): static
  166.     {
  167.         $this->type $type;
  168.         return $this;
  169.     }
  170.     public function getLocation(): ?string
  171.     {
  172.         return $this->location;
  173.     }
  174.     public function setLocation(string $location): static
  175.     {
  176.         $this->location $location;
  177.         return $this;
  178.     }
  179.     public function getFragment(): ?string
  180.     {
  181.         return $this->fragment;
  182.     }
  183.     public function setFragment(string $fragment): static
  184.     {
  185.         $this->fragment $fragment;
  186.         return $this;
  187.     }
  188.     public function getNetwork(): ?string
  189.     {
  190.         return $this->network;
  191.     }
  192.     public function setNetwork(string $network): static
  193.     {
  194.         $this->network $network;
  195.         return $this;
  196.     }
  197. }