fix: update table joins

This commit is contained in:
Maël Gangloff
2024-07-10 23:58:59 +02:00
parent cbaca7bf6a
commit 0951f93134
6 changed files with 8 additions and 59 deletions

View File

@@ -12,10 +12,6 @@ use Doctrine\ORM\Mapping as ORM;
class Domain
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $ldhname = null;
@@ -46,11 +42,6 @@ class Domain
$this->domainEntities = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLdhname(): ?string
{
return $this->ldhname;

View File

@@ -9,26 +9,18 @@ use Doctrine\ORM\Mapping as ORM;
class DomainEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'domainEntities')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'ldhname')]
private ?Domain $domain = null;
#[ORM\Id]
#[ORM\ManyToOne(inversedBy: 'domainEntities')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'handle')]
private ?Entity $entity = null;
#[ORM\Column(length: 255)]
private ?string $roles = null;
public function getId(): ?int
{
return $this->id;
}
public function getDomain(): ?Domain
{
return $this->domain;

View File

@@ -11,10 +11,6 @@ use Doctrine\ORM\Mapping as ORM;
class Entity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $handle = null;
@@ -36,11 +32,6 @@ class Entity
$this->nameserverEntities = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getHandle(): ?string
{
return $this->handle;

View File

@@ -10,25 +10,17 @@ use Doctrine\ORM\Mapping as ORM;
class Event
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $action = null;
#[ORM\Column(type: Types::DATE_IMMUTABLE)]
private ?\DateTimeImmutable $date = null;
#[ORM\Id]
#[ORM\ManyToOne(inversedBy: 'events')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'ldhname')]
private ?Domain $domain = null;
public function getId(): ?int
{
return $this->id;
}
public function getAction(): ?string
{
return $this->action;

View File

@@ -12,10 +12,6 @@ use Doctrine\ORM\Mapping as ORM;
class Nameserver
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $handle = null;
@@ -36,11 +32,6 @@ class Nameserver
$this->nameserverEntities = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getHandle(): ?string
{
return $this->handle;

View File

@@ -10,16 +10,13 @@ use Doctrine\ORM\Mapping as ORM;
class NameserverEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'nameserverEntities')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'handle')]
private ?Nameserver $nameserver = null;
#[ORM\Id]
#[ORM\ManyToOne(inversedBy: 'nameserverEntities')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'handle')]
private ?Entity $entity = null;
#[ORM\Column(type: Types::ARRAY)]
@@ -28,11 +25,6 @@ class NameserverEntity
#[ORM\Column(type: Types::ARRAY)]
private array $status = [];
public function getId(): ?int
{
return $this->id;
}
public function getNameserver(): ?Nameserver
{
return $this->nameserver;