mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add groups on properties
This commit is contained in:
@@ -87,13 +87,15 @@ class Entity
|
||||
private ?array $remarks = null;
|
||||
|
||||
#[Embedded(class: IanaAccreditation::class, columnPrefix: 'iana_')]
|
||||
private ?IanaAccreditation $ianaAccreditation;
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
private IanaAccreditation $ianaAccreditation;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->domainEntities = new ArrayCollection();
|
||||
$this->nameserverEntities = new ArrayCollection();
|
||||
$this->events = new ArrayCollection();
|
||||
$this->ianaAccreditation = new IanaAccreditation();
|
||||
}
|
||||
|
||||
public function getHandle(): ?string
|
||||
@@ -246,12 +248,12 @@ class Entity
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIanaAccreditation(): ?IanaAccreditation
|
||||
public function getIanaAccreditation(): IanaAccreditation
|
||||
{
|
||||
return $this->ianaAccreditation;
|
||||
}
|
||||
|
||||
public function setIanaAccreditation(?IanaAccreditation $ianaAccreditation): void
|
||||
public function setIanaAccreditation(IanaAccreditation $ianaAccreditation): void
|
||||
{
|
||||
$this->ianaAccreditation = $ianaAccreditation;
|
||||
}
|
||||
|
||||
@@ -6,23 +6,29 @@ use App\Config\RegistrarStatus;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\ORM\Mapping\Embeddable;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
#[Embeddable]
|
||||
class IanaAccreditation
|
||||
{
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
private ?string $registrarName = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
private ?string $rdapBaseUrl = null;
|
||||
|
||||
#[ORM\Column(nullable: true, enumType: RegistrarStatus::class)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
private ?RegistrarStatus $status = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
private ?\DateTimeImmutable $updated = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_IMMUTABLE, nullable: true)]
|
||||
#[Groups(['entity:item', 'domain:item'])]
|
||||
private ?\DateTimeImmutable $date = null;
|
||||
|
||||
public function getRegistrarName(): ?string
|
||||
|
||||
Reference in New Issue
Block a user