src/Entity/Website/Analytics/ServersUsage.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Website\Analytics;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Website\Website\Website;
  5. use App\Repository\Website\Analytics\ServersUsageRepository;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  9. #[ORM\Entity(repositoryClassServersUsageRepository::class)]
  10. class ServersUsage  extends BaseEntity
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\Column(type'guid'uniquetrue)]
  14.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  15.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  16.     private ?string $id null;
  17.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  18.     private ?\DateTimeInterface $date null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $ip null;
  21.     #[ORM\Column(typeTypes::BIGINT)]
  22.     private ?string $totalUsage null;
  23.     #[ORM\ManyToOne(inversedBy'serversUsages')]
  24.     #[ORM\JoinColumn(nullabletrue)]
  25.     private ?Website $website null;
  26.     public function __construct()
  27.     {
  28.         parent::__construct();
  29.         $this->setTotalUsage(0);
  30.     }
  31.     public function getId(): ?string
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getDate(): ?\DateTimeInterface
  36.     {
  37.         return $this->date;
  38.     }
  39.     public function setDate(\DateTimeInterface $date): static
  40.     {
  41.         $this->date $date;
  42.         return $this;
  43.     }
  44.     public function getIp(): ?string
  45.     {
  46.         return $this->ip;
  47.     }
  48.     public function setIp(string $ip): static
  49.     {
  50.         $this->ip $ip;
  51.         return $this;
  52.     }
  53.     public function getTotalUsage(): ?string
  54.     {
  55.         return $this->totalUsage;
  56.     }
  57.     public function setTotalUsage(string $totalUsage): static
  58.     {
  59.         $this->totalUsage $totalUsage;
  60.         return $this;
  61.     }
  62.     public function getWebsite(): ?Website
  63.     {
  64.         return $this->website;
  65.     }
  66.     public function setWebsite(?Website $website): static
  67.     {
  68.         $this->website $website;
  69.         return $this;
  70.     }
  71. }