feat(desktop): report current user online clients

This commit is contained in:
2026-05-06 18:25:05 +08:00
parent 930f095c64
commit 47681ab1f5
12 changed files with 297 additions and 12 deletions
@@ -89,3 +89,12 @@ FROM desktop_clients
WHERE workspace_id = sqlc.arg(workspace_id)
AND revoked_at IS NULL
ORDER BY last_seen_at DESC NULLS LAST, created_at DESC;
-- name: ListDesktopClientsByUser :many
SELECT *
FROM desktop_clients
WHERE tenant_id = sqlc.arg(tenant_id)
AND workspace_id = sqlc.arg(workspace_id)
AND user_id = sqlc.arg(user_id)
AND revoked_at IS NULL
ORDER BY last_seen_at DESC NULLS LAST, created_at DESC;