287 lines
6.1 KiB
PHP
287 lines
6.1 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(length: 255, nullable: true)]
|
|
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(mappedBy: 'networkSettings', targetEntity: OrganizationalUnit::class)]
|
|
private Collection $organizationalUnits;
|
|
|
|
#[ORM\ManyToOne(targetEntity: Menu::class)]
|
|
#[ORM\JoinColumn(nullable: true)]
|
|
private ?Menu $menu = null;
|
|
|
|
#[ORM\ManyToOne(targetEntity: HardwareProfile::class)]
|
|
#[ORM\JoinColumn(nullable: true)]
|
|
private ?HardwareProfile $hardwareProfile = null;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?bool $validation = null;
|
|
|
|
#[ORM\ManyToOne]
|
|
private ?OgRepository $repository = null;
|
|
|
|
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;
|
|
}
|
|
|
|
public function getMenu(): ?Menu
|
|
{
|
|
return $this->menu;
|
|
}
|
|
|
|
public function setMenu(?Menu $menu): static
|
|
{
|
|
$this->menu = $menu;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getHardwareProfile(): ?HardwareProfile
|
|
{
|
|
return $this->hardwareProfile;
|
|
}
|
|
|
|
public function setHardwareProfile(?HardwareProfile $hardwareProfile): static
|
|
{
|
|
$this->hardwareProfile = $hardwareProfile;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getValidation(): ?bool
|
|
{
|
|
return $this->validation;
|
|
}
|
|
|
|
public function setValidation(?bool $validation): static
|
|
{
|
|
$this->validation = $validation;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRepository(): ?OgRepository
|
|
{
|
|
return $this->repository;
|
|
}
|
|
|
|
public function setRepository(?OgRepository $repository): static
|
|
{
|
|
$this->repository = $repository;
|
|
|
|
return $this;
|
|
}
|
|
}
|