src/Entity/VPN/OcServ/Protocol.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\VPN\OcServ;
  3. use App\Entity\BaseEntity;
  4. use App\Repository\VPN\OcServ\ProtocolRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  7. #[ORM\Table(name'`ocserv_protocol`')]
  8. #[ORM\Entity(repositoryClassProtocolRepository::class)]
  9. class Protocol extends BaseEntity
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\Column(type'guid'uniquetrue)]
  13.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  14.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  15.     private ?string $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $address null;
  18.     #[ORM\Column]
  19.     private ?bool $isServerHasOwnerInfo null;
  20.     #[ORM\Column]
  21.     private ?int $incomePort null;
  22.     #[ORM\Column]
  23.     private ?int $destinationPort null;
  24.     #[ORM\ManyToOne(inversedBy'protocols')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?Server $server null;
  27.     public function __construct()
  28.     {
  29.         parent::__construct();
  30.     }
  31.     public function getId(): ?string
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getAddress(): ?string
  36.     {
  37.         return $this->address;
  38.     }
  39.     public function setAddress(string $address): static
  40.     {
  41.         $this->address $address;
  42.         return $this;
  43.     }
  44.     public function isServerHasOwnerInfo(): ?bool
  45.     {
  46.         return $this->isServerHasOwnerInfo;
  47.     }
  48.     public function setIsServerHasOwnerInfo(bool $isServerHasOwnerInfo): static
  49.     {
  50.         $this->isServerHasOwnerInfo $isServerHasOwnerInfo;
  51.         return $this;
  52.     }
  53.     public function getIncomePort(): ?int
  54.     {
  55.         return $this->incomePort;
  56.     }
  57.     public function setIncomePort(int $incomePort): static
  58.     {
  59.         $this->incomePort $incomePort;
  60.         return $this;
  61.     }
  62.     public function getDestinationPort(): ?int
  63.     {
  64.         return $this->destinationPort;
  65.     }
  66.     public function setDestinationPort(int $destinationPort): static
  67.     {
  68.         $this->destinationPort $destinationPort;
  69.         return $this;
  70.     }
  71.     public function getServer(): ?Server
  72.     {
  73.         return $this->server;
  74.     }
  75.     public function setServer(?Server $server): static
  76.     {
  77.         $this->server $server;
  78.         return $this;
  79.     }
  80. }