-- name: InsertAudit :exec
INSERT INTO audit_log (org_id, actor_user_id, actor_token_jti, action, target, result, detail)
VALUES ($1, $2, $3, $4, $5, $6, $7);

-- name: ListAudit :many
SELECT * FROM audit_log
WHERE org_id = $1
ORDER BY created DESC
LIMIT $2 OFFSET $3;
