mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add indexes in db
This commit is contained in:
@@ -60,6 +60,9 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||
'ds:list',
|
||||
],
|
||||
],
|
||||
parameters: [
|
||||
'forced' => new QueryParameter(schema: ['type' => 'boolean'], description: 'Force an RDAP request', required: false),
|
||||
],
|
||||
),
|
||||
],
|
||||
provider: AutoRegisterDomainProvider::class
|
||||
|
||||
@@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
|
||||
#[ORM\Entity(repositoryClass: DomainEntityRepository::class)]
|
||||
#[ORM\Index(name: 'domain_entity_roles_idx', columns: ['roles'])]
|
||||
class DomainEntity
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
||||
@@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\UniqueConstraint(
|
||||
columns: ['action', 'date', 'domain_id']
|
||||
)]
|
||||
#[ORM\Index(name: 'domain_event_action_idx', columns: ['action'])]
|
||||
class DomainEvent extends Event
|
||||
{
|
||||
#[ORM\ManyToOne(targetEntity: Domain::class, inversedBy: 'events')]
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Entity;
|
||||
|
||||
use ApiPlatform\Metadata\ApiProperty;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use App\Repository\EntityRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
@@ -15,30 +14,6 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||
#[ORM\UniqueConstraint(
|
||||
columns: ['tld_id', 'handle']
|
||||
)]
|
||||
#[ApiResource(
|
||||
operations: [
|
||||
/*
|
||||
new GetCollection(
|
||||
uriTemplate: '/entities',
|
||||
normalizationContext: ['groups' => ['entity:list', 'event:list']]
|
||||
),
|
||||
|
||||
new Get(
|
||||
uriTemplate: '/entities/{id}',
|
||||
normalizationContext: [
|
||||
'groups' => [
|
||||
'event:list',
|
||||
'entity:item',
|
||||
'domain-entity:domain',
|
||||
'domain:list',
|
||||
'nameserver-entity:nameserver',
|
||||
'nameserver:list',
|
||||
],
|
||||
]
|
||||
),
|
||||
*/
|
||||
]
|
||||
)]
|
||||
class Entity
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
||||
@@ -9,6 +9,7 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
#[ORM\UniqueConstraint(
|
||||
columns: ['action', 'date', 'entity_uid']
|
||||
)]
|
||||
#[ORM\Index(name: 'entity_event_action_idx', columns: ['action'])]
|
||||
class EntityEvent extends Event
|
||||
{
|
||||
#[ORM\ManyToOne(targetEntity: Entity::class, inversedBy: 'events')]
|
||||
|
||||
@@ -50,6 +50,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
||||
]
|
||||
)]
|
||||
#[ORM\Entity(repositoryClass: IcannAccreditationRepository::class)]
|
||||
#[ORM\Index(name: 'icann_accreditation_status_idx', columns: ['status'])]
|
||||
class IcannAccreditation
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
||||
@@ -31,6 +31,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
|
||||
)]
|
||||
#[ApiFilter(SearchFilter::class)]
|
||||
#[ORM\Entity(repositoryClass: TldRepository::class)]
|
||||
#[ORM\Index(name: 'tld_type_idx', columns: ['type'])]
|
||||
class Tld
|
||||
{
|
||||
#[ORM\Id]
|
||||
|
||||
Reference in New Issue
Block a user