Refactor brand service and related components

- Removed ListQuestionVersions method and associated types from BrandService and Queries.
- Updated PromptRuleGenerationService to change task naming and handling.
- Enhanced ScheduleTaskService to support filtering by created date range and keyword.
- Introduced InstantTaskService for managing instant tasks with appropriate filtering and response structures.
- Added InstantTaskHandler for handling API requests related to instant tasks.
- Created InstantTaskTab component for the admin web interface to display and manage instant tasks.
- Updated database migrations to rename source types for articles and generation tasks.
- Adjusted models and repository queries to reflect the removal of question version handling.
This commit is contained in:
2026-04-02 21:16:12 +08:00
parent 111498a65f
commit 8958cb44c0
36 changed files with 1378 additions and 358 deletions
@@ -85,13 +85,6 @@ WHERE id = sqlc.arg(id) AND brand_id = sqlc.arg(brand_id) AND tenant_id = sqlc.a
UPDATE brand_questions SET deleted_at = NOW(), updated_at = NOW()
WHERE brand_id = sqlc.arg(brand_id) AND tenant_id = sqlc.arg(tenant_id) AND deleted_at IS NULL;
-- name: ListQuestionVersions :many
SELECT v.id, v.question_id, v.question_text, v.question_hash, v.version_no, v.is_active, v.created_at
FROM brand_question_versions v
JOIN brand_questions q ON q.id = v.question_id
WHERE q.brand_id = sqlc.arg(brand_id) AND q.tenant_id = sqlc.arg(tenant_id)
ORDER BY v.created_at DESC;
-- name: ListCompetitors :many
SELECT id, tenant_id, brand_id, name, website, description, product_lines_json, created_at, updated_at
FROM competitors