src/Entity/VPN/Service/ServiceUsage.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\VPN\Service;
  3. use App\Entity\BaseEntity;
  4. use App\Repository\VPN\Service\ServiceUsageRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  8. #[ORM\Entity(repositoryClassServiceUsageRepository::class)]
  9. class ServiceUsage extends BaseEntity
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\Column(type'guid'uniquetrue)]
  13.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  14.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  15.     private ?string $id null;
  16.     #[ORM\ManyToOne(inversedBy'serviceUsages')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Service $service null;
  19.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  20.     private ?\DateTimeInterface $date null;
  21.     #[ORM\Column(typeTypes::BIGINT)]
  22.     private ?string $ocUsage null;
  23.     #[ORM\Column(typeTypes::BIGINT)]
  24.     private ?string $v2rayUsage null;
  25.     #[ORM\Column(typeTypes::BIGINT)]
  26.     private ?string $openUsage null;
  27.     public function __construct()
  28.     {
  29.         parent::__construct();
  30.         $this->setOpenUsage(0);
  31.         $this->setOcUsage(0);
  32.         $this->setV2rayUsage(0);
  33.     }
  34.     public function getId(): ?string
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getService(): ?Service
  39.     {
  40.         return $this->service;
  41.     }
  42.     public function setService(?Service $service): static
  43.     {
  44.         $this->service $service;
  45.         return $this;
  46.     }
  47.     public function getDate(): ?\DateTimeInterface
  48.     {
  49.         return $this->date;
  50.     }
  51.     public function setDate(\DateTimeInterface $date): static
  52.     {
  53.         $this->date $date;
  54.         return $this;
  55.     }
  56.     public function getOcUsage(): ?string
  57.     {
  58.         return $this->ocUsage;
  59.     }
  60.     public function setOcUsage(string $ocUsage): static
  61.     {
  62.         $this->ocUsage $ocUsage;
  63.         return $this;
  64.     }
  65.     public function getV2rayUsage(): ?string
  66.     {
  67.         return $this->v2rayUsage;
  68.     }
  69.     public function setV2rayUsage(string $v2rayUsage): static
  70.     {
  71.         $this->v2rayUsage $v2rayUsage;
  72.         return $this;
  73.     }
  74.     public function getOpenUsage(): ?string
  75.     {
  76.         return $this->openUsage;
  77.     }
  78.     public function setOpenUsage(string $openUsage): static
  79.     {
  80.         $this->openUsage $openUsage;
  81.         return $this;
  82.     }
  83. }