chore: rename table columns

This commit is contained in:
Maël Gangloff
2025-09-10 22:17:19 +02:00
parent 10e573e483
commit acc3a4550a
4 changed files with 165 additions and 84 deletions

View File

@@ -3,13 +3,11 @@
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Config\RegistrarStatus;
use App\Repository\EntityRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Embedded;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
@@ -88,23 +86,8 @@ class Entity
#[Groups(['entity:item', 'domain:item'])]
private ?array $remarks = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(['entity:item', 'domain:item'])]
private ?string $registrarNameIANA = null;
#[ORM\Column(length: 255, nullable: true)]
#[Groups(['entity:item', 'domain:item'])]
private ?string $rdapBaseUrlIANA = null;
#[ORM\Column(nullable: true, enumType: RegistrarStatus::class)]
#[Groups(['entity:item', 'domain:item'])]
private ?RegistrarStatus $statusIANA = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $updatedIANA = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $dateIANA = null;
#[Embedded(class: IanaAccreditation::class, columnPrefix: 'iana_')]
private ?IanaAccreditation $ianaAccreditation;
public function __construct()
{
@@ -263,63 +246,13 @@ class Entity
return $this;
}
public function getRegistrarNameIANA(): ?string
public function getIanaAccreditation(): ?IanaAccreditation
{
return $this->registrarNameIANA;
return $this->ianaAccreditation;
}
public function setRegistrarNameIANA(?string $registrarNameIANA): static
public function setIanaAccreditation(?IanaAccreditation $ianaAccreditation): void
{
$this->registrarNameIANA = $registrarNameIANA;
return $this;
}
public function getRdapBaseUrlIANA(): ?string
{
return $this->rdapBaseUrlIANA;
}
public function setRdapBaseUrlIANA(?string $rdapBaseUrlIANA): static
{
$this->rdapBaseUrlIANA = $rdapBaseUrlIANA;
return $this;
}
public function getStatusIANA(): ?RegistrarStatus
{
return $this->statusIANA;
}
public function setStatusIANA(?RegistrarStatus $statusIANA): static
{
$this->statusIANA = $statusIANA;
return $this;
}
public function getUpdatedIANA(): ?\DateTimeImmutable
{
return $this->updatedIANA;
}
public function setUpdatedIANA(?\DateTimeImmutable $updatedIANA): static
{
$this->updatedIANA = $updatedIANA;
return $this;
}
public function getDateIANA(): ?\DateTimeImmutable
{
return $this->dateIANA;
}
public function setDateIANA(?\DateTimeImmutable $dateIANA): static
{
$this->dateIANA = $dateIANA;
return $this;
$this->ianaAccreditation = $ianaAccreditation;
}
}

View File

@@ -0,0 +1,87 @@
<?php
namespace App\Entity;
use App\Config\RegistrarStatus;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Embeddable;
#[Embeddable]
class IanaAccreditation
{
#[ORM\Column(length: 255, nullable: true)]
private ?string $registrarName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $rdapBaseUrl = null;
#[ORM\Column(nullable: true, enumType: RegistrarStatus::class)]
private ?RegistrarStatus $status = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $updated = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $date = null;
public function getRegistrarName(): ?string
{
return $this->registrarName;
}
public function setRegistrarName(?string $registrarName): static
{
$this->registrarName = $registrarName;
return $this;
}
public function getRdapBaseUrl(): ?string
{
return $this->rdapBaseUrl;
}
public function setRdapBaseUrl(?string $rdapBaseUrl): static
{
$this->rdapBaseUrl = $rdapBaseUrl;
return $this;
}
public function getStatus(): ?RegistrarStatus
{
return $this->status;
}
public function setStatus(?RegistrarStatus $status): static
{
$this->status = $status;
return $this;
}
public function getUpdated(): ?\DateTimeImmutable
{
return $this->updated;
}
public function setUpdated(?\DateTimeImmutable $updated): static
{
$this->updated = $updated;
return $this;
}
public function getDate(): ?\DateTimeImmutable
{
return $this->date;
}
public function setDate(?\DateTimeImmutable $date): static
{
$this->date = $date;
return $this;
}
}