feat(issues): add structured ticket search

This commit is contained in:
pseudoyu 2026-04-08 00:35:27 +08:00
parent efe131591f
commit 34c39b765e
No known key found for this signature in database
11 changed files with 1033 additions and 27 deletions

View file

@ -7,6 +7,14 @@ WHERE workspace_id = $1
ORDER BY position ASC, created_at DESC
LIMIT $2 OFFSET $3;
-- name: ListAllIssues :many
SELECT * FROM issue
WHERE workspace_id = $1
AND (sqlc.narg('status')::text IS NULL OR status = sqlc.narg('status'))
AND (sqlc.narg('priority')::text IS NULL OR priority = sqlc.narg('priority'))
AND (sqlc.narg('assignee_id')::uuid IS NULL OR assignee_id = sqlc.narg('assignee_id'))
ORDER BY position ASC, created_at DESC;
-- name: GetIssue :one
SELECT * FROM issue
WHERE id = $1;