Download src/Stat/Domain/Entities/UsageStatEntity.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 777 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Stat/Domain/Entities/UsageStatEntity.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Stat/Domain/Entities/UsageStatEntity.php
-
curl -L -o UsageStatEntity.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Stat/Domain/Entities/UsageStatEntity.php
777 Bytes
| declare(strict_types=1); | |
| namespace Stat\Domain\Entities; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Stat\Domain\ValueObjects\Metric; | |
| use Workspace\Domain\Entities\WorkspaceEntity; | |
| #[ORM\Entity] | |
| class UsageStatEntity extends AbstractStatEntity | |
| { | |
| #[ORM\ManyToOne(targetEntity: WorkspaceEntity::class, inversedBy: 'stats')] | |
| #[ORM\JoinColumn(onDelete: 'SET NULL', nullable: true)] | |
| private ?WorkspaceEntity $workspace = null; | |
| public function __construct( | |
| WorkspaceEntity $workspace, | |
| Metric $usage | |
| ) { | |
| parent::__construct(); | |
| $this->workspace = $workspace; | |
| $this->incrementMetric( | |
| $usage | |
| ); | |
| } | |
| public function getWorkspace(): ?WorkspaceEntity | |
| { | |
| return $this->workspace; | |
| } | |
| } | |