<?phpnamespace App\Model;/** One line of Notifications > Events: an action of the user (start a VM...), its progress and how it ended. */final class LogEntry{ public const RUNNING = 'running'; public const DONE = 'done'; public const FAILED = 'failed'; public const CANCELLED = 'cancelled'; public float $progress = 0; public string $status = self::RUNNING; public string $detail = ''; public ?string $taskRef = null; public float $finished = 0; /** when it started (seconds since 1970) */ public int $at; /** stable while the log changes (lines are removed, the oldest dropped): the lists name it "log:<id>" */ public int $id; private static int $next = 0; public function __construct(public string $title, public string $server, public ?string $target, public float $started) { $this->at = time(); $this->id = ++self::$next; }}