stage1 part b

This commit is contained in:
alorig
2025-11-24 13:42:03 +05:00
parent ef735eb70b
commit f63ce92587
11 changed files with 1327 additions and 376 deletions

View File

@@ -836,6 +836,10 @@ Clusters (inherits SiteSectorBaseModel)
keywords: ManyToMany(Keywords)
status: str (active, archived)
created_at, updated_at
# Stage 1 Changes (Nov 2025):
# REMOVED: context_type, dimension_meta
# Now pure topic-based clustering
```
**ContentIdeas** (`business/planning/models.py`)
@@ -856,35 +860,48 @@ ContentIdeas (inherits SiteSectorBaseModel)
```python
Tasks (inherits SiteSectorBaseModel)
account, site, sector (from base)
content_idea: ContentIdea (FK, nullable)
cluster: Cluster (FK, nullable)
title: str
brief: text
target_keywords: JSON
status: str (pending, in_progress, completed, published)
description: text (brief)
keywords: JSON (target keywords)
content_type: str (post, page, product, etc.)
content_structure: JSON (template for content generation)
taxonomy_term_id: int (optional categorization)
status: str (queued, completed) # Simplified in Stage 1
assigned_post_id: int (WP post ID)
post_url: URL
content: Content (OneToOne, reverse)
created_at, updated_at
# Stage 1 Changes (Nov 2025):
# REMOVED: content_idea FK, cluster_role, entity_type, cluster_context, dimension_roles, metadata, content_record
# ADDED: content_type, content_structure, taxonomy_term_id
# CHANGED: status simplified to (queued, completed)
```
**Content** (`business/content/models.py`)
```python
Content (inherits SiteSectorBaseModel)
account, site, sector (from base)
task: Tasks (OneToOne, nullable)
cluster_id: int (cluster reference)
title: str
content_html: text
content_plain: text
excerpt: text
meta_description: str
entity_type: str (post, page, product, service)
content_html: text (generated HTML content)
content_type: str (post, page, product, etc.)
content_structure: JSON (structure template used)
taxonomy_terms: ManyToMany(ContentTaxonomy) # Direct M2M
external_id: str (WP post ID)
external_type: str (post, page)
sync_status: str (draft, imported, synced, published)
taxonomies: ManyToMany(ContentTaxonomy)
attributes: JSON
external_url: URL (published URL)
source: str (igny8, wordpress, import)
status: str (draft, published) # Simplified in Stage 1
created_at, updated_at
# Stage 1 Changes (Nov 2025):
# REMOVED: task FK, html_content, word_count, metadata, meta_title, meta_description,
# primary_keyword, secondary_keywords, entity_type, json_blocks, structure_data,
# content_format, cluster_role, sync_status, external_type, external_status,
# sync_data, last_synced_at, validation_errors, is_validated
# ADDED: cluster_id, title, content_html, content_type, content_structure
# CHANGED: status simplified to (draft, published)
# CHANGED: taxonomy relationship from through model to direct M2M
```
**Images** (`business/content/models.py`)
@@ -901,6 +918,23 @@ Images (inherits SiteSectorBaseModel)
created_at, updated_at
```
**ContentTaxonomy** (`business/content/models.py`)
```python
ContentTaxonomy (inherits SiteSectorBaseModel)
account, site, sector (from base)
name: str
slug: str
taxonomy_type: str (category, post_tag, cluster)
external_id: str (WordPress taxonomy term ID)
external_taxonomy: str (WordPress taxonomy name)
created_at, updated_at
# Stage 1 Changes (Nov 2025):
# REMOVED: description, parent FK, sync_status, count, metadata, clusters M2M
# ADDED: 'cluster' as taxonomy_type option
# Simplified to essential fields for WP sync
```
### Integration Models
**SiteIntegration** (`business/integration/models.py`)