mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: search domain by registrant name
This commit is contained in:
@@ -14,6 +14,8 @@ use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||
#[ORM\UniqueConstraint(
|
||||
columns: ['tld_id', 'handle']
|
||||
)]
|
||||
#[ORM\Index(name: 'entity_j_card_fn_idx', columns: ['j_card_fn'])]
|
||||
#[ORM\Index(name: 'entity_j_card_org_idx', columns: ['j_card_org'])]
|
||||
class Entity
|
||||
{
|
||||
#[ORM\Id]
|
||||
@@ -63,6 +65,24 @@ class Entity
|
||||
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
||||
private array $jCard = [];
|
||||
|
||||
#[ORM\Column(
|
||||
type: 'string',
|
||||
insertable: false,
|
||||
updatable: false,
|
||||
columnDefinition: "VARCHAR(255) GENERATED ALWAYS AS (LOWER(jsonb_path_query_first(j_card, '$[1]?(@[0] == \"fn\")[3]') #>> '{}')) STORED",
|
||||
generated: 'ALWAYS',
|
||||
)]
|
||||
private ?string $jCardFn;
|
||||
|
||||
#[ORM\Column(
|
||||
type: 'string',
|
||||
insertable: false,
|
||||
updatable: false,
|
||||
columnDefinition: "VARCHAR(255) GENERATED ALWAYS AS (LOWER(jsonb_path_query_first(j_card, '$[1]?(@[0] == \"org\")[3]') #>> '{}')) STORED",
|
||||
generated: 'ALWAYS',
|
||||
)]
|
||||
private ?string $jCardOrg;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
#[Groups(['entity:item', 'domain:item', 'watchlist:item'])]
|
||||
private ?array $remarks = null;
|
||||
@@ -239,4 +259,28 @@ class Entity
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getJCardFn(): ?string
|
||||
{
|
||||
return $this->jCardFn;
|
||||
}
|
||||
|
||||
public function getJCardOrg(): ?string
|
||||
{
|
||||
return $this->jCardOrg;
|
||||
}
|
||||
|
||||
public function setJCardFn(?string $jCardFn): Entity
|
||||
{
|
||||
$this->jCardFn = $jCardFn;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setJCardOrg(?string $jCardOrg): Entity
|
||||
{
|
||||
$this->jCardOrg = $jCardOrg;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user