2026-04-09 20:21:01 +02:00
|
|
|
<?php declare(strict_types=1);
|
2019-10-27 18:51:03 +01:00
|
|
|
/**
|
|
|
|
|
* This file is part of the SplendidBear Websites' projects.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2019 @ www.splendidbear.org
|
|
|
|
|
*
|
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
|
*/
|
2019-10-27 13:35:33 +01:00
|
|
|
|
|
|
|
|
namespace App\Entity;
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
use App\Repository\GamerRepository;
|
|
|
|
|
use DateTime;
|
|
|
|
|
use Doctrine\DBAL\Types\Types;
|
|
|
|
|
use Doctrine\ORM\Mapping\Column;
|
|
|
|
|
use Doctrine\ORM\Mapping\Entity;
|
|
|
|
|
use Doctrine\ORM\Mapping\GeneratedValue;
|
|
|
|
|
use Doctrine\ORM\Mapping\Id;
|
2019-10-27 13:35:33 +01:00
|
|
|
|
|
|
|
|
/**
|
2019-10-27 18:51:03 +01:00
|
|
|
* Class Gamer
|
|
|
|
|
*
|
2026-04-09 20:21:01 +02:00
|
|
|
* @package App\Entity
|
|
|
|
|
* @author Lang <https://www.splendidbear.org>
|
|
|
|
|
* @category Class
|
|
|
|
|
* @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License
|
|
|
|
|
* @link www.splendidbear.org
|
|
|
|
|
* @since 2026. 04. 09.
|
2019-10-27 13:35:33 +01:00
|
|
|
*/
|
2026-04-09 20:21:01 +02:00
|
|
|
#[Entity(repositoryClass: GamerRepository::class)]
|
2019-10-27 13:35:33 +01:00
|
|
|
class Gamer
|
|
|
|
|
{
|
2026-04-09 20:21:01 +02:00
|
|
|
#[Id, GeneratedValue, Column]
|
|
|
|
|
private ?int $id = null;
|
|
|
|
|
|
|
|
|
|
#[Column(length: 100)]
|
|
|
|
|
private ?string $userName = null;
|
|
|
|
|
|
|
|
|
|
#[Column(length: 20, nullable: true)]
|
|
|
|
|
private ?string $ip = null;
|
|
|
|
|
|
|
|
|
|
#[Column(length: 100, nullable: true)]
|
|
|
|
|
private ?string $country = null;
|
|
|
|
|
|
|
|
|
|
#[Column(nullable: true)]
|
|
|
|
|
private ?string $userAgent = null;
|
|
|
|
|
|
|
|
|
|
#[Column(type: Types::DATETIME_MUTABLE)]
|
|
|
|
|
private ?DateTime $connTimestamp = null;
|
|
|
|
|
|
2019-10-27 13:35:33 +01:00
|
|
|
|
|
|
|
|
public function getId(): ?int
|
|
|
|
|
{
|
|
|
|
|
return $this->id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getUserName(): ?string
|
|
|
|
|
{
|
|
|
|
|
return $this->userName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setUserName(?string $userName): void
|
|
|
|
|
{
|
|
|
|
|
$this->userName = $userName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getIp(): ?string
|
|
|
|
|
{
|
|
|
|
|
return $this->ip;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setIp(?string $ip): void
|
|
|
|
|
{
|
|
|
|
|
$this->ip = $ip;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
public function getCountry(): ?string
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->country;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
public function setCountry(?string $country): void
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
$this->country = $country;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
public function getUserAgent(): ?string
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->userAgent;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
public function setUserAgent(?string $userAgent): void
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
$this->userAgent = $userAgent;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
public function getConnTimestamp(): ?DateTime
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
return $this->connTimestamp;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 20:21:01 +02:00
|
|
|
public function setConnTimestamp(?DateTime $connTimestamp): void
|
2019-10-27 13:35:33 +01:00
|
|
|
{
|
|
|
|
|
$this->connTimestamp = $connTimestamp;
|
|
|
|
|
}
|
|
|
|
|
}
|