<?php
namespace App\Entity\Server\ManageIt;
use App\Entity\BaseEntity;
use App\Repository\Server\ManageIt\ServerTypeRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: ServerTypeRepository::class)]
#[ORM\Table(name: '`manageit_sell_server_server_type`')]
class ServerType 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)]
private ?string $systemId = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $description = null;
#[ORM\Column]
private ?int $cores = null;
#[ORM\Column]
private ?float $memory = null;
#[ORM\Column]
private ?float $disk = null;
#[ORM\Column(length: 255)]
private ?string $hourlyPrice = null;
#[ORM\Column(length: 255)]
private ?string $monthlyPrice = null;
public string $calculatedHourlyPrice;
public string $calculatedMonthlyPrice;
#[ORM\ManyToOne(inversedBy: 'serverTypes')]
#[ORM\JoinColumn(nullable: false)]
private ?DataCenter $datacenter = null;
public function __toString()
{
return
'Core : ' . $this->getCores()
. ' - '
.'Memory : '.$this->getMemory();
}
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 getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getCores(): ?int
{
return $this->cores;
}
public function setCores(int $cores): static
{
$this->cores = $cores;
return $this;
}
public function getMemory(): ?float
{
return $this->memory;
}
public function setMemory(float $memory): static
{
$this->memory = $memory;
return $this;
}
public function getDisk(): ?float
{
return $this->disk;
}
public function setDisk(float $disk): static
{
$this->disk = $disk;
return $this;
}
public function getHourlyPrice(): ?string
{
return $this->hourlyPrice;
}
public function setHourlyPrice(string $hourlyPrice): static
{
$this->hourlyPrice = $hourlyPrice;
return $this;
}
public function getMonthlyPrice(): ?string
{
return $this->monthlyPrice;
}
public function setMonthlyPrice(string $monthlyPrice): static
{
$this->monthlyPrice = $monthlyPrice;
return $this;
}
public function getDatacenter(): ?DataCenter
{
return $this->datacenter;
}
public function setDatacenter(?DataCenter $datacenter): static
{
$this->datacenter = $datacenter;
return $this;
}
public function getCalculatedHourlyPrice(): string
{
return $this->calculatedHourlyPrice;
}
public function setCalculatedHourlyPrice(string $calculatedHourlyPrice): void
{
$this->calculatedHourlyPrice = $calculatedHourlyPrice;
}
public function getCalculatedMonthlyPrice(): string
{
return $this->calculatedMonthlyPrice;
}
public function setCalculatedMonthlyPrice(string $calculatedMonthlyPrice): void
{
$this->calculatedMonthlyPrice = $calculatedMonthlyPrice;
}
}