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:
@@ -214,6 +214,7 @@ export interface ArticleListParams {
|
||||
generate_status?: string;
|
||||
publish_status?: string;
|
||||
source_type?: string;
|
||||
generation_mode?: string;
|
||||
template_id?: number;
|
||||
prompt_rule_id?: number;
|
||||
keyword?: string;
|
||||
@@ -228,6 +229,7 @@ export interface ArticleListItem {
|
||||
template_name: string | null;
|
||||
prompt_rule_id: number | null;
|
||||
prompt_rule_name: string | null;
|
||||
generation_mode: string | null;
|
||||
platforms: string[];
|
||||
generate_status: string;
|
||||
publish_status: string;
|
||||
@@ -250,6 +252,7 @@ export interface ArticleDetail {
|
||||
source_type: string;
|
||||
template_id: number | null;
|
||||
template_name: string | null;
|
||||
generation_mode: string | null;
|
||||
platforms: string[];
|
||||
generate_status: string;
|
||||
publish_status: string;
|
||||
@@ -327,16 +330,6 @@ export interface Question {
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface QuestionVersion {
|
||||
id: number;
|
||||
question_id: number;
|
||||
question_text: string;
|
||||
question_hash: string;
|
||||
version_no: number;
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface CompetitorRequest {
|
||||
name: string;
|
||||
website?: string | null;
|
||||
@@ -450,6 +443,9 @@ export interface ScheduleTaskListParams {
|
||||
page_size?: number;
|
||||
prompt_rule_id?: number;
|
||||
status?: string;
|
||||
keyword?: string;
|
||||
created_from?: string;
|
||||
created_to?: string;
|
||||
}
|
||||
|
||||
export interface ScheduleTaskListResponse {
|
||||
@@ -474,3 +470,31 @@ export interface GenerateFromRuleResponse {
|
||||
article_id: number;
|
||||
task_id: number;
|
||||
}
|
||||
|
||||
export interface InstantTaskListParams {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
prompt_rule_id?: number;
|
||||
status?: string;
|
||||
keyword?: string;
|
||||
created_from?: string;
|
||||
created_to?: string;
|
||||
}
|
||||
|
||||
export interface InstantTaskItem {
|
||||
id: number;
|
||||
article_id: number | null;
|
||||
prompt_rule_id: number | null;
|
||||
prompt_rule_name: string | null;
|
||||
name: string;
|
||||
status: string;
|
||||
execution_time: string | null;
|
||||
platforms: string[];
|
||||
generate_count: number;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface InstantTaskListResponse {
|
||||
items: InstantTaskItem[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user