<?php
namespace App\Entity\VPN\OcServ;
use App\Entity\BaseEntity;
use App\Repository\VPN\OcServ\ProtocolRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Table(name: '`ocserv_protocol`')]
#[ORM\Entity(repositoryClass: ProtocolRepository::class)]
class Protocol 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 $address = null;
#[ORM\Column]
private ?bool $isServerHasOwnerInfo = null;
#[ORM\Column]
private ?int $incomePort = null;
#[ORM\Column]
private ?int $destinationPort = null;
#[ORM\ManyToOne(inversedBy: 'protocols')]
#[ORM\JoinColumn(nullable: false)]
private ?Server $server = null;
public function __construct()
{
parent::__construct();
}
public function getId(): ?string
{
return $this->id;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): static
{
$this->address = $address;
return $this;
}
public function isServerHasOwnerInfo(): ?bool
{
return $this->isServerHasOwnerInfo;
}
public function setIsServerHasOwnerInfo(bool $isServerHasOwnerInfo): static
{
$this->isServerHasOwnerInfo = $isServerHasOwnerInfo;
return $this;
}
public function getIncomePort(): ?int
{
return $this->incomePort;
}
public function setIncomePort(int $incomePort): static
{
$this->incomePort = $incomePort;
return $this;
}
public function getDestinationPort(): ?int
{
return $this->destinationPort;
}
public function setDestinationPort(int $destinationPort): static
{
$this->destinationPort = $destinationPort;
return $this;
}
public function getServer(): ?Server
{
return $this->server;
}
public function setServer(?Server $server): static
{
$this->server = $server;
return $this;
}
}