mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
68 lines
1.3 KiB
PHP
68 lines
1.3 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Entity;
|
||
|
|
|
||
|
|
use App\Repository\DomainEntityRepository;
|
||
|
|
use Doctrine\ORM\Mapping as ORM;
|
||
|
|
|
||
|
|
#[ORM\Entity(repositoryClass: DomainEntityRepository::class)]
|
||
|
|
class DomainEntity
|
||
|
|
{
|
||
|
|
#[ORM\Id]
|
||
|
|
#[ORM\GeneratedValue]
|
||
|
|
#[ORM\Column]
|
||
|
|
private ?int $id = null;
|
||
|
|
|
||
|
|
#[ORM\ManyToOne(inversedBy: 'domainEntities')]
|
||
|
|
#[ORM\JoinColumn(nullable: false)]
|
||
|
|
private ?Domain $domain = null;
|
||
|
|
|
||
|
|
#[ORM\ManyToOne(inversedBy: 'domainEntities')]
|
||
|
|
#[ORM\JoinColumn(nullable: false)]
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
}
|