mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
chore: rename table columns
This commit is contained in:
@@ -14,6 +14,7 @@ use App\Entity\DomainEvent;
|
||||
use App\Entity\DomainStatus;
|
||||
use App\Entity\Entity;
|
||||
use App\Entity\EntityEvent;
|
||||
use App\Entity\IanaAccreditation;
|
||||
use App\Entity\Nameserver;
|
||||
use App\Entity\NameserverEntity;
|
||||
use App\Entity\RdapServer;
|
||||
@@ -567,11 +568,11 @@ readonly class RDAPService
|
||||
|
||||
$entity->setHandle($rdapEntity['handle']);
|
||||
|
||||
if (isset($rdapEntity['remarks']) && is_array($rdapEntity['remarks']) && null === $entity->getStatusIANA()) {
|
||||
if (isset($rdapEntity['remarks']) && is_array($rdapEntity['remarks']) && null === $entity->getIanaAccreditation()) {
|
||||
$entity->setRemarks($rdapEntity['remarks']);
|
||||
}
|
||||
|
||||
if (isset($rdapEntity['vcardArray']) && null === $entity->getStatusIANA()) {
|
||||
if (isset($rdapEntity['vcardArray']) && null === $entity->getIanaAccreditation()) {
|
||||
if (empty($entity->getJCard())) {
|
||||
if (!array_key_exists('elements', $rdapEntity['vcardArray'])) {
|
||||
$entity->setJCard($rdapEntity['vcardArray']);
|
||||
@@ -605,7 +606,7 @@ readonly class RDAPService
|
||||
}
|
||||
}
|
||||
|
||||
if ($isIANAid || !isset($rdapEntity['events']) || null !== $entity->getStatusIANA()) {
|
||||
if ($isIANAid || !isset($rdapEntity['events']) || null !== $entity->getIanaAccreditation()) {
|
||||
return $entity;
|
||||
}
|
||||
|
||||
@@ -822,15 +823,21 @@ readonly class RDAPService
|
||||
$entity = new Entity();
|
||||
}
|
||||
$entity
|
||||
->setHandle(strval($registrar->value))->setTld(null)
|
||||
->setRegistrarNameIANA(strval($registrar->name))
|
||||
->setStatusIANA(RegistrarStatus::from(strval($registrar->status)))
|
||||
->setRdapBaseUrlIANA($registrar->rdapurl->count() ? strval($registrar->rdapurl->server) : null)
|
||||
->setUpdatedIANA(null !== $registrar->attributes()->updated ? new \DateTimeImmutable(strval($registrar->attributes()->updated)) : null)
|
||||
->setDateIANA(null !== $registrar->attributes()->date ? new \DateTimeImmutable(strval($registrar->attributes()->date)) : null)
|
||||
->setJCard(['vcard', [['version', [], 'text', '4.0'], ['fn', [], 'text', $entity->getRegistrarNameIANA()]]])
|
||||
->setHandle($registrar->value)
|
||||
->setTld(null)
|
||||
->setJCard(['vcard', [['version', [], 'text', '4.0'], ['fn', [], 'text', $registrar->name]]])
|
||||
->setRemarks(null);
|
||||
|
||||
if (null === $entity->getIanaAccreditation()) {
|
||||
$entity->setIanaAccreditation(new IanaAccreditation());
|
||||
}
|
||||
$entity->getIanaAccreditation()
|
||||
->setRegistrarName($registrar->name)
|
||||
->setStatus(RegistrarStatus::from($registrar->status))
|
||||
->setRdapBaseUrl($registrar->rdapurl->count() ? ($registrar->rdapurl->server) : null)
|
||||
->setUpdated(null !== $registrar->attributes()->updated ? new \DateTimeImmutable($registrar->attributes()->updated) : null)
|
||||
->setDate(null !== $registrar->attributes()->date ? new \DateTimeImmutable($registrar->attributes()->date) : null);
|
||||
|
||||
$this->em->persist($entity);
|
||||
}
|
||||
$this->em->flush();
|
||||
|
||||
Reference in New Issue
Block a user