feat: update entities to comply with RDAP

This commit is contained in:
Maël Gangloff
2024-07-13 00:22:17 +02:00
parent ab3b6b1170
commit 4b062a6759
12 changed files with 5611 additions and 816 deletions

View File

@@ -12,10 +12,8 @@ use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: NameserverRepository::class)]
class Nameserver
{
#[ORM\Id]
#[ORM\Column(length: 255)]
private ?string $handle = null;
#[ORM\Id]
#[ORM\Column(length: 255)]
private ?string $ldhName = null;
@@ -25,9 +23,6 @@ class Nameserver
#[ORM\OneToMany(targetEntity: NameserverEntity::class, mappedBy: 'nameserver', cascade: ['persist'], orphanRemoval: true)]
private Collection $nameserverEntities;
#[ORM\Column(type: Types::SIMPLE_ARRAY, enumType: DomainStatus::class)]
private array $status = [];
/**
* @var Collection<int, Domain>
*/
@@ -40,18 +35,6 @@ class Nameserver
$this->domains = new ArrayCollection();
}
public function getHandle(): ?string
{
return $this->handle;
}
public function setHandle(string $handle): static
{
$this->handle = $handle;
return $this;
}
public function getLdhName(): ?string
{
return $this->ldhName;
@@ -59,7 +42,7 @@ class Nameserver
public function setLdhName(string $ldhName): static
{
$this->ldhName = $ldhName;
$this->ldhName = strtolower($ldhName);
return $this;
}
@@ -94,21 +77,6 @@ class Nameserver
return $this;
}
/**
* @return DomainStatus[]
*/
public function getStatus(): array
{
return $this->status;
}
public function setStatus(array $status): static
{
$this->status = $status;
return $this;
}
/**
* @return Collection<int, Domain>
*/