2024-07-10 23:30:59 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
2024-07-11 13:15:04 +02:00
|
|
|
use App\Config\DomainRole;
|
2024-07-10 23:30:59 +02:00
|
|
|
use App\Repository\NameserverEntityRepository;
|
|
|
|
|
use Doctrine\DBAL\Types\Types;
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
|
|
#[ORM\Entity(repositoryClass: NameserverEntityRepository::class)]
|
|
|
|
|
class NameserverEntity
|
|
|
|
|
{
|
|
|
|
|
#[ORM\Id]
|
2024-07-12 00:50:30 +02:00
|
|
|
#[ORM\ManyToOne(targetEntity: Nameserver::class, cascade: ['persist'], inversedBy: 'nameserverEntities')]
|
2024-07-13 00:22:17 +02:00
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'ldh_name', nullable: false)]
|
2024-07-10 23:30:59 +02:00
|
|
|
private ?Nameserver $nameserver = null;
|
|
|
|
|
|
2024-07-10 23:58:59 +02:00
|
|
|
#[ORM\Id]
|
2024-07-12 00:50:30 +02:00
|
|
|
#[ORM\ManyToOne(targetEntity: Entity::class, cascade: ['persist'], inversedBy: 'nameserverEntities')]
|
2024-07-13 17:04:29 +02:00
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'handle', nullable: false)]
|
2024-07-10 23:30:59 +02:00
|
|
|
private ?Entity $entity = null;
|
|
|
|
|
|
2024-07-13 15:52:52 +02:00
|
|
|
|
2024-07-11 13:15:04 +02:00
|
|
|
#[ORM\Column(type: Types::SIMPLE_ARRAY, enumType: DomainRole::class)]
|
2024-07-10 23:30:59 +02:00
|
|
|
private array $roles = [];
|
|
|
|
|
|
2024-07-14 21:15:13 +02:00
|
|
|
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
|
2024-07-10 23:30:59 +02:00
|
|
|
private array $status = [];
|
|
|
|
|
|
|
|
|
|
public function getNameserver(): ?Nameserver
|
|
|
|
|
{
|
|
|
|
|
return $this->nameserver;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setNameserver(?Nameserver $nameserver): static
|
|
|
|
|
{
|
|
|
|
|
$this->nameserver = $nameserver;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getEntity(): ?Entity
|
|
|
|
|
{
|
|
|
|
|
return $this->entity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setEntity(?Entity $entity): static
|
|
|
|
|
{
|
|
|
|
|
$this->entity = $entity;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-11 13:15:04 +02:00
|
|
|
/**
|
|
|
|
|
* @return DomainRole[]
|
|
|
|
|
*/
|
2024-07-10 23:30:59 +02:00
|
|
|
public function getRoles(): array
|
|
|
|
|
{
|
|
|
|
|
return $this->roles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setRoles(array $roles): static
|
|
|
|
|
{
|
|
|
|
|
$this->roles = $roles;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getStatus(): array
|
|
|
|
|
{
|
|
|
|
|
return $this->status;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setStatus(array $status): static
|
|
|
|
|
{
|
|
|
|
|
$this->status = $status;
|
|
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
2024-07-11 13:15:04 +02:00
|
|
|
|
2024-07-10 23:30:59 +02:00
|
|
|
}
|