2022-09-29 20:09:31 -04:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
2022-10-14 11:16:53 -04:00
|
|
|
use App\Enum\CardBusEnum;
|
2022-10-13 22:26:33 -04:00
|
|
|
use App\Enum\SlotKeyEnum;
|
2022-10-14 11:16:53 -04:00
|
|
|
use App\Types\CardBusEnumType;
|
2022-10-13 22:26:33 -04:00
|
|
|
use App\Types\SlotKeyEnumType;
|
2022-09-29 20:09:31 -04:00
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
#[ORM\Table(name: 'gpu', schema: 'collection')]
|
|
|
|
#[ORM\Entity]
|
|
|
|
class Gpu
|
|
|
|
{
|
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: 'gpu_brand_id', referencedColumnName: 'id', nullable: FALSE)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private Brand $gpuBrand;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\ManyToOne(targetEntity: 'GpuCore')]
|
2022-10-07 16:04:34 -04:00
|
|
|
#[ORM\OrderBy(['brand' => 'asc', 'name' => 'asc'])]
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\JoinColumn(name: 'gpu_core_id', referencedColumnName: 'id', nullable: TRUE)]
|
2022-10-13 22:26:33 -04:00
|
|
|
private ?GpuCore $gpuCore = null;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'reference_model_name', nullable: FALSE)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private string $modelName;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-10-07 16:04:34 -04:00
|
|
|
#[ORM\ManyToOne(targetEntity: 'Brand')]
|
|
|
|
#[ORM\OrderBy(['name' => 'asc'])]
|
|
|
|
#[ORM\JoinColumn(name: 'board_brand_id', referencedColumnName: 'id', nullable: TRUE)]
|
|
|
|
private ?Brand $boardBrand = NULL;
|
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'alternate_model_name', nullable: TRUE)]
|
2022-10-07 16:04:34 -04:00
|
|
|
private ?string $alternateModelName = '';
|
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'card_key',
|
|
|
|
type: 'string',
|
|
|
|
enumType: SlotKeyEnum::class,
|
|
|
|
options: array(
|
|
|
|
'comment' => "The shape of the card connector",
|
|
|
|
'default' => "PCIe x16"
|
|
|
|
)
|
|
|
|
)]
|
2022-10-14 11:16:53 -04:00
|
|
|
private SlotKeyEnum $cardKey = SlotKeyEnum::PCIE_X16;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'bus_interface',
|
|
|
|
type: 'string',
|
|
|
|
nullable: TRUE,
|
|
|
|
enumType: CardBusEnum::class,
|
|
|
|
options: array('comment' => "The type of electrical bus this card uses")
|
|
|
|
)]
|
2022-10-14 11:16:53 -04:00
|
|
|
private ?CardBusEnum $busInterface;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'slot_span',
|
|
|
|
options: array(
|
|
|
|
'comment' => "How many expansion slots the card occupies",
|
|
|
|
'default' => 1,
|
|
|
|
),
|
|
|
|
)]
|
|
|
|
private int $slotSpan = 1;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(name: 'molex_power', options: array('default' => 0))]
|
2022-10-07 16:04:34 -04:00
|
|
|
private int $molexPower = 0;
|
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(name: 'pcie_6_pin', options: array('default' => 0))]
|
2022-10-07 16:04:34 -04:00
|
|
|
private int $pcie6power = 0;
|
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(name: 'pcie_8_pin', options: array('default' => 0))]
|
2022-10-07 16:04:34 -04:00
|
|
|
private int $pcie8power = 0;
|
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'tdp',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: array('comment' => "Thermal Design Power (in Watts)")
|
|
|
|
)]
|
2022-10-13 22:26:33 -04:00
|
|
|
private ?int $tdp = 0;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'base_clock',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: array('comment' => "Base speed of the gpu core, in MHz")
|
|
|
|
)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private ?int $baseClock;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'boost_clock',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: array('comment' => "GPU core boost clock, in MHz")
|
|
|
|
)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private ?int $boostClock;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'memory_clock',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: array('comment' => "Clock speed of the VRAM, in MHz")
|
|
|
|
)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private ?int $memoryClock;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'memory_size',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: array('comment' => 'VRAM size, in MiB')
|
|
|
|
)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private ?int $memorySize;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(
|
|
|
|
name: 'memory_bus',
|
|
|
|
nullable: TRUE,
|
|
|
|
options: array("comment" => 'The width of the memory bus in bits')
|
|
|
|
)]
|
2022-10-07 22:00:14 -04:00
|
|
|
private ?int $memoryBus;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'memory_type', nullable: TRUE)]
|
|
|
|
private ?string $memoryType;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'shading_units', nullable: TRUE)]
|
|
|
|
private ?int $shadingUnits;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'tmus', nullable: TRUE)]
|
|
|
|
private ?int $tmus;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'rops', nullable: TRUE)]
|
|
|
|
private ?int $rops;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'compute_units', nullable: TRUE)]
|
|
|
|
private ?int $computeUnits;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'l1_cache', nullable: TRUE)]
|
|
|
|
private ?string $l1cache;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'l2_cache', nullable: TRUE)]
|
|
|
|
private ?string $l2cache;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'direct_x_support', nullable: TRUE)]
|
|
|
|
private ?string $directXSupport;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'opengl_support', nullable: TRUE)]
|
|
|
|
private ?string $openGLSupport;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'opencl_support', nullable: TRUE)]
|
|
|
|
private ?string $openCLSupport;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'vulkan_support', nullable: TRUE)]
|
|
|
|
private ?string $vulkanSupport;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-07 22:00:14 -04:00
|
|
|
#[ORM\Column(name: 'shader_model', nullable: TRUE)]
|
|
|
|
private ?string $shaderModel;
|
2022-10-07 16:04:34 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(name: 'link', nullable: TRUE)]
|
|
|
|
private ?string $link;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(name: 'count', nullable: FALSE, options: array('default' => 1))]
|
2022-10-07 16:04:34 -04:00
|
|
|
private int $count = 1;
|
|
|
|
|
2022-10-19 12:40:07 -04:00
|
|
|
#[ORM\Column(name: 'acquired', nullable: FALSE, options: array('default' => true))]
|
2022-10-07 16:04:34 -04:00
|
|
|
private bool $acquired;
|
2022-09-29 20:09:31 -04:00
|
|
|
|
2022-09-30 10:49:02 -04:00
|
|
|
#[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
|
2022-10-07 16:04:34 -04:00
|
|
|
private ?string $notes = '';
|
2022-09-29 20:09:31 -04:00
|
|
|
}
|