mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add tld properties
This commit is contained in:
@@ -10,9 +10,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\Entity(repositoryClass: RdapServerRepository::class)]
|
||||
class RdapServer
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(length: 63)]
|
||||
private ?string $tld = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(length: 255)]
|
||||
@@ -21,23 +18,17 @@ class RdapServer
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE)]
|
||||
private ?DateTimeImmutable $updatedAt = null;
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\ManyToOne(inversedBy: 'rdapServers')]
|
||||
#[ORM\JoinColumn(referencedColumnName: 'tld', nullable: false)]
|
||||
private ?Tld $tld = null;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->updatedAt = new DateTimeImmutable('now');
|
||||
}
|
||||
|
||||
public function getTld(): ?string
|
||||
{
|
||||
return $this->tld;
|
||||
}
|
||||
|
||||
public function setTld(string $tld): static
|
||||
{
|
||||
$this->tld = $tld;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUrl(): ?string
|
||||
{
|
||||
return $this->url;
|
||||
@@ -68,4 +59,16 @@ class RdapServer
|
||||
{
|
||||
$this->setUpdatedAt(new DateTimeImmutable('now'));
|
||||
}
|
||||
|
||||
public function getTld(): ?Tld
|
||||
{
|
||||
return $this->tld;
|
||||
}
|
||||
|
||||
public function setTld(?Tld $tld): static
|
||||
{
|
||||
$this->tld = $tld;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user