collection-crud/src/Entity/GpuCore.php

134 lines
2.7 KiB
PHP

<?php declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'gpu_core', schema: 'collection')]
#[ORM\Entity]
class GpuCore
{
use GetSetTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
private int $id;
#[ORM\ManyToOne(targetEntity: 'Brand')]
#[ORM\JoinColumn(name: 'brand_id', referencedColumnName: 'id')]
private Brand $brand;
#[ORM\Column(name: 'name')]
private readonly string $name;
#[ORM\Column(name: 'variant', nullable: TRUE)]
private readonly ?string $variant;
#[ORM\Column(name: 'generation_name')]
private readonly string $generationName;
#[ORM\Column(name: 'architecture')]
private readonly string $architecture;
#[ORM\Column(name: 'architecture_link')]
private readonly string $architectureLink;
#[ORM\Column(name: 'process_node', nullable: TRUE)]
private readonly ?int $processNode;
public function __toString(): string
{
return "{$this->brand} {$this->name} ({$this->variant}/{$this->generationName})";
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getVariant(): ?string
{
return $this->variant;
}
public function setVariant(string $variant): self
{
$this->variant = $variant;
return $this;
}
public function getGenerationName(): ?string
{
return $this->generationName;
}
public function setGenerationName(string $generationName): self
{
$this->generationName = $generationName;
return $this;
}
public function getArchitecture(): ?string
{
return $this->architecture;
}
public function setArchitecture(string $architecture): self
{
$this->architecture = $architecture;
return $this;
}
public function getArchitectureLink(): ?string
{
return $this->architectureLink;
}
public function setArchitectureLink(string $architectureLink): self
{
$this->architectureLink = $architectureLink;
return $this;
}
public function getProcessNode(): ?int
{
return $this->processNode;
}
public function setProcessNode(int $processNode): self
{
$this->processNode = $processNode;
return $this;
}
public function getBrand(): ?Brand
{
return $this->brand;
}
public function setBrand(?Brand $brand): self
{
$this->brand = $brand;
return $this;
}
}