feat: add tld type property

This commit is contained in:
Maël Gangloff
2024-07-24 18:52:19 +02:00
parent 0dfc0cdd58
commit 89e967cadf
5 changed files with 111 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Config\TldType;
use App\Repository\TldRepository;
use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
@@ -63,6 +64,9 @@ class Tld
#[Groups(["tld:item"])]
private ?bool $specification13 = null;
#[ORM\Column(length: 10, nullable: true, enumType: TldType::class)]
private ?TldType $type = null;
public function __construct()
{
$this->rdapServers = new ArrayCollection();
@@ -181,4 +185,16 @@ class Tld
return $this;
}
public function getType(): ?TldType
{
return $this->type;
}
public function setType(TldType $type): static
{
$this->type = $type;
return $this;
}
}