27 lines
478 B
PHP
27 lines
478 B
PHP
<?php
|
|
|
|
namespace Lucent\Command\Data;
|
|
|
|
use stdClass;
|
|
|
|
class CommandLogItem
|
|
{
|
|
public function __construct(
|
|
public string $id,
|
|
public string $signature,
|
|
public ?int $pid,
|
|
public string $logs,
|
|
)
|
|
{
|
|
}
|
|
|
|
public static function fromDB(stdClass $data): self
|
|
{
|
|
return new self(
|
|
id: $data->id,
|
|
signature: $data->signature,
|
|
pid: $data->pid,
|
|
logs: $data->logs,
|
|
);
|
|
}
|
|
} |