<?php
namespace App\Entity\Server\Hetzner;
use App\Entity\BaseEntity;
use App\Entity\Generic\User;
use App\Repository\Server\Hetzner\IpRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: IpRepository::class)]
#[ORM\Table(name: '`hetzner_sell_server_ip`')]
class Ip extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private $id;
#[ORM\Column(length: 255, nullable: true)]
private ?string $systemId = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $ip = null;
#[ORM\ManyToOne(inversedBy: 'ips')]
private ?Server $server = null;
#[ORM\ManyToOne(inversedBy: 'hetznerIps')]
#[ORM\JoinColumn(nullable: false)]
private ?User $owner = null;
#[ORM\Column]
private ?bool $isLocked = null;
public function getId(): ?string
{
return $this->id;
}
public function getSystemId(): ?string
{
return $this->systemId;
}
public function setSystemId(?string $systemId): static
{
$this->systemId = $systemId;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): static
{
$this->type = $type;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): static
{
$this->name = $name;
return $this;
}
public function getIp(): ?string
{
return $this->ip;
}
public function setIp(?string $ip): static
{
$this->ip = $ip;
return $this;
}
public function getServer(): ?Server
{
return $this->server;
}
public function setServer(?Server $server): static
{
$this->server = $server;
return $this;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): static
{
$this->owner = $owner;
return $this;
}
public function isIsLocked(): ?bool
{
return $this->isLocked;
}
public function setIsLocked(bool $isLocked): static
{
$this->isLocked = $isLocked;
return $this;
}
}