src/Entity/Server/ManageIt/ServerType.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Server\ManageIt;
  3. use App\Entity\BaseEntity;
  4. use App\Repository\Server\ManageIt\ServerTypeRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  7. #[ORM\Entity(repositoryClassServerTypeRepository::class)]
  8. #[ORM\Table(name'`manageit_sell_server_server_type`')]
  9. class ServerType 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 $id;
  16.     #[ORM\Column(length255)]
  17.     private ?string $systemId null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $name null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $description null;
  22.     #[ORM\Column]
  23.     private ?int $cores null;
  24.     #[ORM\Column]
  25.     private ?float $memory null;
  26.     #[ORM\Column]
  27.     private ?float $disk null;
  28.     #[ORM\Column(length255)]
  29.     private ?string $hourlyPrice null;
  30.     #[ORM\Column(length255)]
  31.     private ?string $monthlyPrice null;
  32.     public string $calculatedHourlyPrice;
  33.     public string $calculatedMonthlyPrice;
  34.     #[ORM\ManyToOne(inversedBy'serverTypes')]
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     private ?DataCenter $datacenter null;
  37.     public function __toString()
  38.     {
  39.         return
  40.             'Core : ' $this->getCores()
  41.             . ' - '
  42.             .'Memory : '.$this->getMemory();
  43.     }
  44.     public function getId(): ?string
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getSystemId(): ?string
  49.     {
  50.         return $this->systemId;
  51.     }
  52.     public function setSystemId(string $systemId): static
  53.     {
  54.         $this->systemId $systemId;
  55.         return $this;
  56.     }
  57.     public function getName(): ?string
  58.     {
  59.         return $this->name;
  60.     }
  61.     public function setName(string $name): static
  62.     {
  63.         $this->name $name;
  64.         return $this;
  65.     }
  66.     public function getDescription(): ?string
  67.     {
  68.         return $this->description;
  69.     }
  70.     public function setDescription(?string $description): static
  71.     {
  72.         $this->description $description;
  73.         return $this;
  74.     }
  75.     public function getCores(): ?int
  76.     {
  77.         return $this->cores;
  78.     }
  79.     public function setCores(int $cores): static
  80.     {
  81.         $this->cores $cores;
  82.         return $this;
  83.     }
  84.     public function getMemory(): ?float
  85.     {
  86.         return $this->memory;
  87.     }
  88.     public function setMemory(float $memory): static
  89.     {
  90.         $this->memory $memory;
  91.         return $this;
  92.     }
  93.     public function getDisk(): ?float
  94.     {
  95.         return $this->disk;
  96.     }
  97.     public function setDisk(float $disk): static
  98.     {
  99.         $this->disk $disk;
  100.         return $this;
  101.     }
  102.     public function getHourlyPrice(): ?string
  103.     {
  104.         return $this->hourlyPrice;
  105.     }
  106.     public function setHourlyPrice(string $hourlyPrice): static
  107.     {
  108.         $this->hourlyPrice $hourlyPrice;
  109.         return $this;
  110.     }
  111.     public function getMonthlyPrice(): ?string
  112.     {
  113.         return $this->monthlyPrice;
  114.     }
  115.     public function setMonthlyPrice(string $monthlyPrice): static
  116.     {
  117.         $this->monthlyPrice $monthlyPrice;
  118.         return $this;
  119.     }
  120.     public function getDatacenter(): ?DataCenter
  121.     {
  122.         return $this->datacenter;
  123.     }
  124.     public function setDatacenter(?DataCenter $datacenter): static
  125.     {
  126.         $this->datacenter $datacenter;
  127.         return $this;
  128.     }
  129.     public function getCalculatedHourlyPrice(): string
  130.     {
  131.         return $this->calculatedHourlyPrice;
  132.     }
  133.     public function setCalculatedHourlyPrice(string $calculatedHourlyPrice): void
  134.     {
  135.         $this->calculatedHourlyPrice $calculatedHourlyPrice;
  136.     }
  137.     public function getCalculatedMonthlyPrice(): string
  138.     {
  139.         return $this->calculatedMonthlyPrice;
  140.     }
  141.     public function setCalculatedMonthlyPrice(string $calculatedMonthlyPrice): void
  142.     {
  143.         $this->calculatedMonthlyPrice $calculatedMonthlyPrice;
  144.     }
  145. }