2024-03-20 14:21:40 -04:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
use App\Enum\{CardBus, SlotKey};
|
|
|
|
|
|
|
|
trait GpuBase {
|
|
|
|
#[ORM\ManyToOne(targetEntity: 'Brand', fetch: 'EAGER')]
|
|
|
|
#[ORM\OrderBy(['name' => 'asc'])]
|
|
|
|
#[ORM\JoinColumn(name: 'gpu_brand_id', referencedColumnName: 'id', nullable: FALSE)]
|
|
|
|
private Brand $gpuBrand;
|
|
|
|
|
|
|
|
#[ORM\ManyToOne(targetEntity: 'GpuCore', fetch: 'EAGER')]
|
|
|
|
#[ORM\OrderBy(['brand' => 'asc', 'name' => 'asc'])]
|
|
|
|
#[ORM\JoinColumn(name: 'gpu_core_id', referencedColumnName: 'id', nullable: TRUE)]
|
|
|
|
private ?GpuCore $gpuCore = NULL;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'reference_model_name', nullable: FALSE)]
|
|
|
|
private string $modelName;
|
|
|
|
|
|
|
|
#[ORM\ManyToOne(targetEntity: 'Brand', fetch: 'EAGER')]
|
|
|
|
#[ORM\OrderBy(['name' => 'asc'])]
|
|
|
|
#[ORM\JoinColumn(name: 'board_brand_id', referencedColumnName: 'id', nullable: TRUE)]
|
|
|
|
private ?Brand $boardBrand = NULL;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'alternate_model_name', nullable: TRUE)]
|
|
|
|
private ?string $alternateModelName = '';
|
|
|
|
|
2024-03-27 16:23:08 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Physical Details
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2024-03-20 14:21:40 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'card_key',
|
|
|
|
type: 'string',
|
|
|
|
enumType: SlotKey::class,
|
|
|
|
options: [
|
|
|
|
'comment' => 'The shape of the card connector',
|
|
|
|
'default' => 'PCIe x16',
|
|
|
|
]
|
|
|
|
)]
|
|
|
|
private SlotKey $cardKey = SlotKey::PCIE_X16;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'bus_interface',
|
|
|
|
type: 'string',
|
|
|
|
nullable: TRUE,
|
|
|
|
enumType: CardBus::class,
|
|
|
|
options: ['comment' => 'The type of electrical bus this card uses']
|
|
|
|
)]
|
|
|
|
private ?CardBus $busInterface;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'slot_span',
|
|
|
|
options: [
|
|
|
|
'comment' => 'How many expansion slots the card occupies',
|
|
|
|
'default' => 1,
|
|
|
|
],
|
|
|
|
)]
|
|
|
|
private int $slotSpan = 1;
|
|
|
|
|
2024-03-27 16:23:08 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Power / Gpu Clock
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2024-03-20 14:21:40 -04:00
|
|
|
#[ORM\Column(name: 'molex_power', options: ['default' => 0])]
|
|
|
|
private int $molexPower = 0;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'pcie_6_pin', options: ['default' => 0])]
|
|
|
|
private int $pcie6power = 0;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'pcie_8_pin', options: ['default' => 0])]
|
|
|
|
private int $pcie8power = 0;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'tdp',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: ['comment' => 'Thermal Design Power (in Watts)']
|
|
|
|
)]
|
|
|
|
private ?int $tdp = 0;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'base_clock',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: ['comment' => 'Base speed of the gpu core, in MHz']
|
|
|
|
)]
|
|
|
|
private ?int $baseClock;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'boost_clock',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: ['comment' => 'GPU core boost clock, in MHz']
|
|
|
|
)]
|
|
|
|
private ?int $boostClock;
|
|
|
|
|
2024-03-27 16:23:08 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Memory Specs
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2024-03-20 14:21:40 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'memory_clock',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: ['comment' => 'Clock speed of the VRAM, in MHz']
|
|
|
|
)]
|
|
|
|
private ?int $memoryClock;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'memory_size',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: ['comment' => 'VRAM size, in MiB']
|
|
|
|
)]
|
|
|
|
private ?int $memorySize;
|
|
|
|
|
|
|
|
#[ORM\Column(
|
|
|
|
name: 'memory_bus',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: ['comment' => 'The width of the memory bus in bits']
|
|
|
|
)]
|
|
|
|
private ?int $memoryBus;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'memory_type', nullable: TRUE)]
|
|
|
|
private ?string $memoryType;
|
|
|
|
|
2024-03-27 16:23:08 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// GPU Core Specs
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2024-03-20 14:21:40 -04:00
|
|
|
#[ORM\Column(name: 'shading_units', nullable: TRUE)]
|
|
|
|
private ?int $shadingUnits;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'tmus', nullable: TRUE)]
|
|
|
|
private ?int $tmus;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'rops', nullable: TRUE)]
|
|
|
|
private ?int $rops;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'compute_units', nullable: TRUE)]
|
|
|
|
private ?int $computeUnits;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'l1_cache', nullable: TRUE)]
|
|
|
|
private ?string $l1cache;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'l2_cache', nullable: TRUE)]
|
|
|
|
private ?string $l2cache;
|
|
|
|
|
2024-03-27 16:23:08 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Rendering API support
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2024-03-20 14:21:40 -04:00
|
|
|
#[ORM\Column(name: 'direct_x_support', nullable: TRUE)]
|
|
|
|
private ?string $directXSupport;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'opengl_support', nullable: TRUE)]
|
|
|
|
private ?string $openGLSupport;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'opencl_support', nullable: TRUE)]
|
|
|
|
private ?string $openCLSupport;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'vulkan_support', nullable: TRUE)]
|
|
|
|
private ?string $vulkanSupport;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'shader_model', nullable: TRUE)]
|
|
|
|
private ?string $shaderModel;
|
|
|
|
|
2024-03-27 16:23:08 -04:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Collection metadata
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
2024-03-20 14:21:40 -04:00
|
|
|
#[ORM\Column(name: 'link', nullable: TRUE)]
|
|
|
|
private ?string $link;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'count', nullable: FALSE, options: ['default' => 1])]
|
|
|
|
private int $count = 1;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'acquired', nullable: FALSE, options: ['default' => TRUE])]
|
|
|
|
private bool $acquired;
|
|
|
|
|
|
|
|
#[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
|
|
|
|
private ?string $notes = '';
|
|
|
|
}
|