<?php
namespace App\Entity\VPN\OpenVPN;
use App\Entity\BaseEntity;
use App\Entity\Country;
use App\Repository\VPN\OpenVPN\ServerRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Table(name: '`ovpn_server`')]
#[ORM\Entity(repositoryClass: ServerRepository::class)]
class Server extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?string $id = null;
#[ORM\Column(length: 255)]
private ?string $UMEndpoint = null;
#[ORM\Column(length: 255)]
private ?string $UMUsername = null;
#[ORM\Column(length: 255)]
private ?string $UMPassword = null;
#[ORM\Column(length: 255)]
private ?string $UMProfileName = null;
#[ORM\Column(length: 255)]
private ?string $address = null;
#[ORM\Column(length: 255)]
private ?string $l2tpAddress = null;
#[ORM\Column(length: 255)]
private ?string $l2tpSecret = null;
#[ORM\Column]
private ?int $UMSSHPort = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $OVPNConfigFile = null;
#[ORM\Column]
private ?bool $isServerHasOwnerInfo = null;
#[ORM\ManyToOne(inversedBy: 'OpenVPNServers')]
#[ORM\JoinColumn(nullable: false)]
private ?Country $country = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $name = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $note = null;
public function __construct()
{
parent::__construct();
}
public function getId(): ?string
{
return $this->id;
}
public function getUMEndpoint(): ?string
{
return $this->UMEndpoint;
}
public function setUMEndpoint(string $UMEndpoint): static
{
$this->UMEndpoint = $UMEndpoint;
return $this;
}
public function getUMUsername(): ?string
{
return $this->UMUsername;
}
public function setUMUsername(string $UMUsername): static
{
$this->UMUsername = $UMUsername;
return $this;
}
public function getUMPassword(): ?string
{
return $this->UMPassword;
}
public function setUMPassword(string $UMPassword): static
{
$this->UMPassword = $UMPassword;
return $this;
}
public function getUMProfileName(): ?string
{
return $this->UMProfileName;
}
public function setUMProfileName(string $UMProfileName): static
{
$this->UMProfileName = $UMProfileName;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): static
{
$this->address = $address;
return $this;
}
public function getL2tpAddress(): ?string
{
return $this->l2tpAddress;
}
public function setL2tpAddress(string $l2tpAddress): static
{
$this->l2tpAddress = $l2tpAddress;
return $this;
}
public function getL2tpSecret(): ?string
{
return $this->l2tpSecret;
}
public function setL2tpSecret(string $l2tpSecret): static
{
$this->l2tpSecret = $l2tpSecret;
return $this;
}
public function getUMSSHPort(): ?int
{
return $this->UMSSHPort;
}
public function setUMSSHPort(int $UMSSHPort): static
{
$this->UMSSHPort = $UMSSHPort;
return $this;
}
public function getOVPNConfigFile(): ?string
{
return $this->OVPNConfigFile;
}
public function setOVPNConfigFile(string $OVPNConfigFile): static
{
$this->OVPNConfigFile = $OVPNConfigFile;
return $this;
}
public function isServerHasOwnerInfo(): ?bool
{
return $this->isServerHasOwnerInfo;
}
public function setIsServerHasOwnerInfo(bool $isServerHasOwnerInfo): static
{
$this->isServerHasOwnerInfo = $isServerHasOwnerInfo;
return $this;
}
public function getCountry(): ?Country
{
return $this->country;
}
public function setCountry(?Country $country): static
{
$this->country = $country;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getNote(): ?string
{
return $this->note;
}
public function setNote(?string $note): static
{
$this->note = $note;
return $this;
}
}