36 lines
No EOL
624 B
PHP
36 lines
No EOL
624 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace GamesShop\Entities\Games;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity]
|
|
#[ORM\Table(name: 'games')]
|
|
final class Game
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\Column(type: 'integer', options: ['unsigned' => true])]
|
|
#[ORM\GeneratedValue]
|
|
private int|null $id;
|
|
#[ORM\Column]
|
|
private string $name;
|
|
|
|
public function getName(): string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* @param string $name
|
|
*/
|
|
public function __construct(string $name)
|
|
{
|
|
$this->name = $name;
|
|
}
|
|
} |