collection-crud/src/Entity/Gpu.php

131 lines
2.8 KiB
PHP
Raw Normal View History

2022-09-29 20:09:31 -04:00
<?php declare(strict_types=1);
namespace App\Entity;
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')]
#[ORM\JoinColumn(name: 'board_brand_id', referencedColumnName: 'id', nullable: TRUE)]
private readonly Brand $boardBrand;
2022-09-29 20:09:31 -04:00
2022-09-30 10:49:02 -04:00
#[ORM\ManyToOne(targetEntity: 'Brand')]
#[ORM\JoinColumn(name: 'gpu_brand_id', referencedColumnName: 'id', nullable: FALSE)]
private readonly Brand $gpuBrand;
2022-09-29 20:09:31 -04:00
2022-09-30 10:49:02 -04:00
#[ORM\ManyToOne(targetEntity: 'GpuCore')]
#[ORM\JoinColumn(name: 'gpu_core_id', referencedColumnName: 'id', nullable: TRUE)]
private readonly GpuCore $gpuCore;
2022-09-29 20:09:31 -04:00
2022-09-30 10:49:02 -04:00
#[ORM\Column(name: 'reference_model_name', nullable: FALSE)]
private readonly string $modelName;
2022-09-29 20:09:31 -04:00
2022-09-30 10:49:02 -04:00
#[ORM\Column(name: 'alternate_model_name', nullable: TRUE)]
private readonly string $alternateModelName;
2022-09-29 20:09:31 -04:00
2022-09-30 10:49:02 -04:00
#[ORM\Column(name: 'count', nullable: FALSE)]
private readonly int $count;
2022-09-29 20:09:31 -04:00
2022-09-30 10:49:02 -04:00
#[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
private readonly string $notes;
2022-09-29 20:09:31 -04:00
public function getId(): ?int
{
return $this->id;
}
public function getModelName(): ?string
{
return $this->modelName;
}
public function setModelName(string $modelName): self
{
$this->modelName = $modelName;
return $this;
}
public function getAlternateModelName(): ?string
{
return $this->alternateModelName;
}
public function setAlternateModelName(?string $alternateModelName): self
{
$this->alternateModelName = $alternateModelName;
return $this;
}
public function getCount(): ?int
{
return $this->count;
}
public function setCount(int $count): self
{
$this->count = $count;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
public function getBoardBrand(): ?Brand
{
return $this->boardBrand;
}
public function setBoardBrand(?Brand $boardBrand): self
{
$this->boardBrand = $boardBrand;
return $this;
}
public function getGpuBrand(): ?Brand
{
return $this->gpuBrand;
}
public function setGpuBrand(?Brand $gpuBrand): self
{
$this->gpuBrand = $gpuBrand;
return $this;
}
public function getGpuCore(): ?GpuCore
{
return $this->gpuCore;
}
public function setGpuCore(?GpuCore $gpuCore): self
{
$this->gpuCore = $gpuCore;
return $this;
}
}