2022-09-29 20:09:31 -04:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2022-10-07 16:04:34 -04:00
|
|
|
use Stringable;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
|
|
|
#[ORM\Table(name: 'gpu_core', schema: 'collection')]
|
|
|
|
#[ORM\Entity]
|
2022-10-07 16:04:34 -04:00
|
|
|
class GpuCore implements Stringable
|
2022-09-29 20:09:31 -04:00
|
|
|
{
|
2022-09-30 10:49:02 -04:00
|
|
|
use GetSetTrait;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
|
|
|
|
#[ORM\Id]
|
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
|
|
|
|
private int $id;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\ManyToOne(targetEntity: 'Brand')]
|
2022-10-07 16:04:34 -04:00
|
|
|
#[ORM\OrderBy(['name' => 'asc'])]
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\JoinColumn(name: 'brand_id', referencedColumnName: 'id')]
|
|
|
|
private Brand $brand;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'name')]
|
|
|
|
private readonly string $name;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'variant', nullable: TRUE)]
|
|
|
|
private readonly ?string $variant;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'generation_name')]
|
|
|
|
private readonly string $generationName;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-10-07 16:04:34 -04:00
|
|
|
#[ORM\Column(name: 'generation_link', nullable: TRUE)]
|
|
|
|
private ?string $generationLink = '';
|
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'architecture')]
|
|
|
|
private readonly string $architecture;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'architecture_link')]
|
|
|
|
private readonly string $architectureLink;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'process_node', nullable: TRUE)]
|
|
|
|
private readonly ?int $processNode;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function __toString(): string
|
|
|
|
{
|
|
|
|
return "{$this->brand} {$this->name} ({$this->variant}/{$this->generationName})";
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getId(): ?int
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getName(): ?string
|
|
|
|
{
|
|
|
|
return $this->name;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setName(string $name): self
|
|
|
|
{
|
|
|
|
$this->name = $name;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getVariant(): ?string
|
|
|
|
{
|
|
|
|
return $this->variant;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setVariant(string $variant): self
|
|
|
|
{
|
|
|
|
$this->variant = $variant;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getGenerationName(): ?string
|
|
|
|
{
|
|
|
|
return $this->generationName;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setGenerationName(string $generationName): self
|
|
|
|
{
|
|
|
|
$this->generationName = $generationName;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-10-07 16:04:34 -04:00
|
|
|
public function getGenerationLink(): ?string
|
|
|
|
{
|
|
|
|
return $this->generationLink;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setGenerationLink(?string $generationLink): self
|
|
|
|
{
|
|
|
|
$this->generationLink = $generationLink;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getArchitecture(): ?string
|
|
|
|
{
|
|
|
|
return $this->architecture;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setArchitecture(string $architecture): self
|
|
|
|
{
|
|
|
|
$this->architecture = $architecture;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getArchitectureLink(): ?string
|
|
|
|
{
|
|
|
|
return $this->architectureLink;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setArchitectureLink(string $architectureLink): self
|
|
|
|
{
|
|
|
|
$this->architectureLink = $architectureLink;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getProcessNode(): ?int
|
|
|
|
{
|
|
|
|
return $this->processNode;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setProcessNode(int $processNode): self
|
|
|
|
{
|
|
|
|
$this->processNode = $processNode;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function getBrand(): ?Brand
|
|
|
|
{
|
|
|
|
return $this->brand;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
public function setBrand(?Brand $brand): self
|
|
|
|
{
|
|
|
|
$this->brand = $brand;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
return $this;
|
|
|
|
}
|
2022-09-29 20:09:31 -04:00
|
|
|
}
|