<?php
namespace App\Entity\Analytics;
use App\Entity\BaseEntity;
use App\Repository\Analytics\ServersUsageRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: ServersUsageRepository::class)]
class ServersUsage extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?string $id = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $date = null;
#[ORM\Column(length: 255)]
private ?string $ip = null;
#[ORM\Column(type: Types::BIGINT)]
private ?string $totalUsage = null;
public function __construct()
{
parent::__construct();
$this->setTotalUsage(0);
}
public function getId(): ?string
{
return $this->id;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): static
{
$this->date = $date;
return $this;
}
public function getIp(): ?string
{
return $this->ip;
}
public function setIp(string $ip): static
{
$this->ip = $ip;
return $this;
}
public function getTotalUsage(): ?string
{
return $this->totalUsage;
}
public function setTotalUsage(string $totalUsage): static
{
$this->totalUsage = $totalUsage;
return $this;
}
}