diff --git a/src/Entity/Domain.php b/src/Entity/Domain.php new file mode 100644 index 0000000..2a4d3a2 --- /dev/null +++ b/src/Entity/Domain.php @@ -0,0 +1,161 @@ + + */ + #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'domain', orphanRemoval: true)] + private Collection $events; + + /** + * @var Collection + */ + #[ORM\OneToMany(targetEntity: DomainEntity::class, mappedBy: 'domain', orphanRemoval: true)] + private Collection $domainEntities; + + #[ORM\Column(length: 255)] + private ?string $whoisStatus = null; + + public function __construct() + { + $this->events = new ArrayCollection(); + $this->domainEntities = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getLdhname(): ?string + { + return $this->ldhname; + } + + public function setLdhname(string $ldhname): static + { + $this->ldhname = $ldhname; + + return $this; + } + + public function getHandle(): ?string + { + return $this->handle; + } + + public function setHandle(string $handle): static + { + $this->handle = $handle; + + return $this; + } + + public function getStatus(): array + { + return $this->status; + } + + public function setStatus(array $status): static + { + $this->status = $status; + + return $this; + } + + /** + * @return Collection + */ + public function getEvents(): Collection + { + return $this->events; + } + + public function addEvent(Event $event): static + { + if (!$this->events->contains($event)) { + $this->events->add($event); + $event->setDomain($this); + } + + return $this; + } + + public function removeEvent(Event $event): static + { + if ($this->events->removeElement($event)) { + // set the owning side to null (unless already changed) + if ($event->getDomain() === $this) { + $event->setDomain(null); + } + } + + return $this; + } + + /** + * @return Collection + */ + public function getDomainEntities(): Collection + { + return $this->domainEntities; + } + + public function addDomainEntity(DomainEntity $domainEntity): static + { + if (!$this->domainEntities->contains($domainEntity)) { + $this->domainEntities->add($domainEntity); + $domainEntity->setDomain($this); + } + + return $this; + } + + public function removeDomainEntity(DomainEntity $domainEntity): static + { + if ($this->domainEntities->removeElement($domainEntity)) { + // set the owning side to null (unless already changed) + if ($domainEntity->getDomain() === $this) { + $domainEntity->setDomain(null); + } + } + + return $this; + } + + public function getWhoisStatus(): ?string + { + return $this->whoisStatus; + } + + public function setWhoisStatus(string $whoisStatus): static + { + $this->whoisStatus = $whoisStatus; + + return $this; + } +} diff --git a/src/Entity/DomainEntity.php b/src/Entity/DomainEntity.php new file mode 100644 index 0000000..9b34250 --- /dev/null +++ b/src/Entity/DomainEntity.php @@ -0,0 +1,67 @@ +id; + } + + public function getDomain(): ?Domain + { + return $this->domain; + } + + public function setDomain(?Domain $domain): static + { + $this->domain = $domain; + + return $this; + } + + public function getEntity(): ?Entity + { + return $this->entity; + } + + public function setEntity(?Entity $entity): static + { + $this->entity = $entity; + + return $this; + } + + public function getRoles(): ?string + { + return $this->roles; + } + + public function setRoles(string $roles): static + { + $this->roles = $roles; + + return $this; + } +} diff --git a/src/Entity/Entity.php b/src/Entity/Entity.php new file mode 100644 index 0000000..854bc55 --- /dev/null +++ b/src/Entity/Entity.php @@ -0,0 +1,115 @@ + + */ + #[ORM\OneToMany(targetEntity: DomainEntity::class, mappedBy: 'entity', orphanRemoval: true)] + private Collection $domainEntities; + + /** + * @var Collection + */ + #[ORM\OneToMany(targetEntity: NameserverEntity::class, mappedBy: 'entity')] + private Collection $nameserverEntities; + + public function __construct() + { + $this->domainEntities = new ArrayCollection(); + $this->nameserverEntities = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + public function getHandle(): ?string + { + return $this->handle; + } + + public function setHandle(string $handle): static + { + $this->handle = $handle; + + return $this; + } + + /** + * @return Collection + */ + public function getDomainEntities(): Collection + { + return $this->domainEntities; + } + + public function addDomainEntity(DomainEntity $domainEntity): static + { + if (!$this->domainEntities->contains($domainEntity)) { + $this->domainEntities->add($domainEntity); + $domainEntity->setEntity($this); + } + + return $this; + } + + public function removeDomainEntity(DomainEntity $domainEntity): static + { + if ($this->domainEntities->removeElement($domainEntity)) { + // set the owning side to null (unless already changed) + if ($domainEntity->getEntity() === $this) { + $domainEntity->setEntity(null); + } + } + + return $this; + } + + /** + * @return Collection + */ + public function getNameserverEntities(): Collection + { + return $this->nameserverEntities; + } + + public function addNameserverEntity(NameserverEntity $nameserverEntity): static + { + if (!$this->nameserverEntities->contains($nameserverEntity)) { + $this->nameserverEntities->add($nameserverEntity); + $nameserverEntity->setEntity($this); + } + + return $this; + } + + public function removeNameserverEntity(NameserverEntity $nameserverEntity): static + { + if ($this->nameserverEntities->removeElement($nameserverEntity)) { + // set the owning side to null (unless already changed) + if ($nameserverEntity->getEntity() === $this) { + $nameserverEntity->setEntity(null); + } + } + + return $this; + } +} diff --git a/src/Entity/Event.php b/src/Entity/Event.php new file mode 100644 index 0000000..ddc094a --- /dev/null +++ b/src/Entity/Event.php @@ -0,0 +1,67 @@ +id; + } + + public function getAction(): ?string + { + return $this->action; + } + + public function setAction(string $action): static + { + $this->action = $action; + + return $this; + } + + public function getDate(): ?\DateTimeImmutable + { + return $this->date; + } + + public function setDate(\DateTimeImmutable $date): static + { + $this->date = $date; + + return $this; + } + + public function getDomain(): ?Domain + { + return $this->domain; + } + + public function setDomain(?Domain $domain): static + { + $this->domain = $domain; + + return $this; + } +} diff --git a/src/Entity/Nameserver.php b/src/Entity/Nameserver.php new file mode 100644 index 0000000..0d0690a --- /dev/null +++ b/src/Entity/Nameserver.php @@ -0,0 +1,109 @@ + + */ + #[ORM\OneToMany(targetEntity: NameserverEntity::class, mappedBy: 'nameserver', orphanRemoval: true)] + private Collection $nameserverEntities; + + #[ORM\Column(type: Types::ARRAY)] + private array $status = []; + + public function __construct() + { + $this->nameserverEntities = new ArrayCollection(); + } + + public function getId(): ?int + { + return $this->id; + } + + 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; + } + + public function setLdhname(string $ldhname): static + { + $this->ldhname = $ldhname; + + return $this; + } + + /** + * @return Collection + */ + public function getNameserverEntities(): Collection + { + return $this->nameserverEntities; + } + + public function addNameserverEntity(NameserverEntity $nameserverEntity): static + { + if (!$this->nameserverEntities->contains($nameserverEntity)) { + $this->nameserverEntities->add($nameserverEntity); + $nameserverEntity->setNameserver($this); + } + + return $this; + } + + public function removeNameserverEntity(NameserverEntity $nameserverEntity): static + { + if ($this->nameserverEntities->removeElement($nameserverEntity)) { + // set the owning side to null (unless already changed) + if ($nameserverEntity->getNameserver() === $this) { + $nameserverEntity->setNameserver(null); + } + } + + return $this; + } + + public function getStatus(): array + { + return $this->status; + } + + public function setStatus(array $status): static + { + $this->status = $status; + + return $this; + } +} diff --git a/src/Entity/NameserverEntity.php b/src/Entity/NameserverEntity.php new file mode 100644 index 0000000..6db63c5 --- /dev/null +++ b/src/Entity/NameserverEntity.php @@ -0,0 +1,83 @@ +id; + } + + 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; + } + + 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; + } +} diff --git a/src/Repository/DomainEntityRepository.php b/src/Repository/DomainEntityRepository.php new file mode 100644 index 0000000..2c67dda --- /dev/null +++ b/src/Repository/DomainEntityRepository.php @@ -0,0 +1,43 @@ + + */ +class DomainEntityRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, DomainEntity::class); + } + +// /** +// * @return DomainEntity[] Returns an array of DomainEntity objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('d') +// ->andWhere('d.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('d.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?DomainEntity +// { +// return $this->createQueryBuilder('d') +// ->andWhere('d.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/DomainRepository.php b/src/Repository/DomainRepository.php new file mode 100644 index 0000000..8af6f40 --- /dev/null +++ b/src/Repository/DomainRepository.php @@ -0,0 +1,43 @@ + + */ +class DomainRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Domain::class); + } + + // /** + // * @return Domain[] Returns an array of Domain objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('d') + // ->andWhere('d.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('d.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Domain + // { + // return $this->createQueryBuilder('d') + // ->andWhere('d.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/EntityRepository.php b/src/Repository/EntityRepository.php new file mode 100644 index 0000000..c4db888 --- /dev/null +++ b/src/Repository/EntityRepository.php @@ -0,0 +1,43 @@ + + */ +class EntityRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Entity::class); + } + + // /** + // * @return Entity[] Returns an array of Entity objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('e') + // ->andWhere('e.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('e.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Entity + // { + // return $this->createQueryBuilder('e') + // ->andWhere('e.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/EventRepository.php b/src/Repository/EventRepository.php new file mode 100644 index 0000000..ec63e8e --- /dev/null +++ b/src/Repository/EventRepository.php @@ -0,0 +1,43 @@ + + */ +class EventRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Event::class); + } + + // /** + // * @return Event[] Returns an array of Event objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('e') + // ->andWhere('e.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('e.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Event + // { + // return $this->createQueryBuilder('e') + // ->andWhere('e.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/NameserverEntityRepository.php b/src/Repository/NameserverEntityRepository.php new file mode 100644 index 0000000..abf89bc --- /dev/null +++ b/src/Repository/NameserverEntityRepository.php @@ -0,0 +1,43 @@ + + */ +class NameserverEntityRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, NameserverEntity::class); + } + + // /** + // * @return NameserverEntity[] Returns an array of NameserverEntity objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('n') + // ->andWhere('n.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('n.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?NameserverEntity + // { + // return $this->createQueryBuilder('n') + // ->andWhere('n.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +} diff --git a/src/Repository/NameserverRepository.php b/src/Repository/NameserverRepository.php new file mode 100644 index 0000000..c3ffa72 --- /dev/null +++ b/src/Repository/NameserverRepository.php @@ -0,0 +1,43 @@ + + */ +class NameserverRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Nameserver::class); + } + + // /** + // * @return Nameserver[] Returns an array of Nameserver objects + // */ + // public function findByExampleField($value): array + // { + // return $this->createQueryBuilder('n') + // ->andWhere('n.exampleField = :val') + // ->setParameter('val', $value) + // ->orderBy('n.id', 'ASC') + // ->setMaxResults(10) + // ->getQuery() + // ->getResult() + // ; + // } + + // public function findOneBySomeField($value): ?Nameserver + // { + // return $this->createQueryBuilder('n') + // ->andWhere('n.exampleField = :val') + // ->setParameter('val', $value) + // ->getQuery() + // ->getOneOrNullResult() + // ; + // } +}