Refactor content handling in GenerateContentFunction and update related models and serializers

- Enhanced GenerateContentFunction to save content in a dedicated Content model, separating it from the Tasks model.
- Updated Tasks model to remove SEO-related fields, now managed in the Content model.
- Modified TasksSerializer to include new content fields and adjusted the API to reflect these changes.
- Improved the auto_generate_content_task method to utilize the new save_output method for better content management.
- Updated frontend components to display new content structure and metadata effectively.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-10 14:06:15 +00:00
parent 8bb4c5d016
commit 8b6e18649c
11 changed files with 596 additions and 356 deletions

View File

@@ -1071,10 +1071,11 @@ export interface Task {
word_count: number;
meta_title?: string | null;
meta_description?: string | null;
primary_keyword?: string | null;
secondary_keywords?: string[] | null;
tags?: string[] | null;
categories?: string[] | null;
content_html?: string | null;
content_primary_keyword?: string | null;
content_secondary_keywords?: string[];
content_tags?: string[];
content_categories?: string[];
assigned_post_id?: number | null;
post_url?: string | null;
created_at: string;
@@ -1841,6 +1842,15 @@ export async function deleteAuthorProfile(id: number): Promise<void> {
export interface Content {
id: number;
task: number;
task_title?: string | null;
title?: string | null;
meta_title?: string | null;
meta_description?: string | null;
primary_keyword?: string | null;
secondary_keywords?: string[];
tags?: string[];
categories?: string[];
status: string;
html_content: string;
word_count: number;
metadata: Record<string, any>;