Files
domain-watchdog/src/Entity/DomainEntity.php

61 lines
1.2 KiB
PHP
Raw Normal View History

2024-07-10 23:30:59 +02:00
<?php
namespace App\Entity;
use App\Repository\DomainEntityRepository;
2024-07-11 00:29:37 +02:00
use Doctrine\DBAL\Types\Types;
2024-07-10 23:30:59 +02:00
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DomainEntityRepository::class)]
class DomainEntity
{
#[ORM\Id]
#[ORM\ManyToOne(inversedBy: 'domainEntities')]
2024-07-10 23:58:59 +02:00
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'ldhname')]
2024-07-10 23:30:59 +02:00
private ?Domain $domain = null;
2024-07-10 23:58:59 +02:00
#[ORM\Id]
2024-07-10 23:30:59 +02:00
#[ORM\ManyToOne(inversedBy: 'domainEntities')]
2024-07-10 23:58:59 +02:00
#[ORM\JoinColumn(nullable: false, referencedColumnName: 'handle')]
2024-07-10 23:30:59 +02:00
private ?Entity $entity = null;
2024-07-11 00:29:37 +02:00
#[ORM\Column(type: Types::ARRAY)]
private array $roles = [];
2024-07-10 23:30:59 +02:00
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;
}
2024-07-11 00:29:37 +02:00
public function getRoles(): ?array
2024-07-10 23:30:59 +02:00
{
return $this->roles;
}
2024-07-11 00:29:37 +02:00
public function setRoles(array $roles): static
2024-07-10 23:30:59 +02:00
{
$this->roles = $roles;
return $this;
}
}