225 lines
4.7 KiB
PHP
225 lines
4.7 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\NetworkSettingsRepository;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Doctrine\Common\Collections\Collection;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: NetworkSettingsRepository::class)]
|
|
class NetworkSettings extends AbstractEntity
|
|
{
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $proxy = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $dns = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $netmask = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $router = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $ntp = null;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?int $p2pTime = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $p2pMode = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $mcastIp = null;
|
|
|
|
#[ORM\Column]
|
|
private ?int $mcastSpeed = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $mcastMode = null;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?int $mcastPort = null;
|
|
|
|
/**
|
|
* @var Collection<int, OrganizationalUnit>
|
|
*/
|
|
#[ORM\OneToMany(targetEntity: OrganizationalUnit::class, mappedBy: 'networkSettings')]
|
|
private Collection $organizationalUnits;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->organizationalUnits = new ArrayCollection();
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getProxy(): ?string
|
|
{
|
|
return $this->proxy;
|
|
}
|
|
|
|
public function setProxy(?string $proxy): static
|
|
{
|
|
$this->proxy = $proxy;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDns(): ?string
|
|
{
|
|
return $this->dns;
|
|
}
|
|
|
|
public function setDns(?string $dns): static
|
|
{
|
|
$this->dns = $dns;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getNetmask(): ?string
|
|
{
|
|
return $this->netmask;
|
|
}
|
|
|
|
public function setNetmask(?string $netmask): static
|
|
{
|
|
$this->netmask = $netmask;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRouter(): ?string
|
|
{
|
|
return $this->router;
|
|
}
|
|
|
|
public function setRouter(?string $router): static
|
|
{
|
|
$this->router = $router;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getNtp(): ?string
|
|
{
|
|
return $this->ntp;
|
|
}
|
|
|
|
public function setNtp(?string $ntp): static
|
|
{
|
|
$this->ntp = $ntp;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getP2pTime(): ?int
|
|
{
|
|
return $this->p2pTime;
|
|
}
|
|
|
|
public function setP2pTime(?int $p2pTime): static
|
|
{
|
|
$this->p2pTime = $p2pTime;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getP2pMode(): ?string
|
|
{
|
|
return $this->p2pMode;
|
|
}
|
|
|
|
public function setP2pMode(?string $p2pMode): static
|
|
{
|
|
$this->p2pMode = $p2pMode;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMcastIp(): ?string
|
|
{
|
|
return $this->mcastIp;
|
|
}
|
|
|
|
public function setMcastIp(?string $mcastIp): static
|
|
{
|
|
$this->mcastIp = $mcastIp;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMcastSpeed(): ?int
|
|
{
|
|
return $this->mcastSpeed;
|
|
}
|
|
|
|
public function setMcastSpeed(int $mcastSpeed): static
|
|
{
|
|
$this->mcastSpeed = $mcastSpeed;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMcastMode(): ?string
|
|
{
|
|
return $this->mcastMode;
|
|
}
|
|
|
|
public function setMcastMode(?string $mcastMode): static
|
|
{
|
|
$this->mcastMode = $mcastMode;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getMcastPort(): ?int
|
|
{
|
|
return $this->mcastPort;
|
|
}
|
|
|
|
public function setMcastPort(?int $mcastPort): static
|
|
{
|
|
$this->mcastPort = $mcastPort;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection<int, OrganizationalUnit>
|
|
*/
|
|
public function getOrganizationalUnits(): Collection
|
|
{
|
|
return $this->organizationalUnits;
|
|
}
|
|
|
|
public function addOrganizationalUnit(OrganizationalUnit $organizationalUnit): static
|
|
{
|
|
if (!$this->organizationalUnits->contains($organizationalUnit)) {
|
|
$this->organizationalUnits->add($organizationalUnit);
|
|
$organizationalUnit->setNetworkSettings($this);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removeOrganizationalUnit(OrganizationalUnit $organizationalUnit): static
|
|
{
|
|
if ($this->organizationalUnits->removeElement($organizationalUnit)) {
|
|
// set the owning side to null (unless already changed)
|
|
if ($organizationalUnit->getNetworkSettings() === $this) {
|
|
$organizationalUnit->setNetworkSettings(null);
|
|
}
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
}
|