refactor-migration again

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-26 15:12:14 +00:00
parent 2ef98b5113
commit f88aae78b1
23 changed files with 942 additions and 211 deletions

View File

@@ -146,18 +146,32 @@ class ContentIdeas(SiteSectorBaseModel):
('published', 'Published'),
]
SITE_ENTITY_TYPE_CHOICES = [
CONTENT_TYPE_CHOICES = [
('post', 'Post'),
('page', 'Page'),
('product', 'Product'),
('service', 'Service'),
('taxonomy_term', 'Taxonomy Term'),
('taxonomy', 'Taxonomy'),
]
CLUSTER_ROLE_CHOICES = [
('hub', 'Hub'),
('supporting', 'Supporting'),
('attribute', 'Attribute'),
CONTENT_STRUCTURE_CHOICES = [
# Post structures
('article', 'Article'),
('guide', 'Guide'),
('comparison', 'Comparison'),
('review', 'Review'),
('listicle', 'Listicle'),
# Page structures
('landing_page', 'Landing Page'),
('business_page', 'Business Page'),
('service_page', 'Service Page'),
('general', 'General'),
('cluster_hub', 'Cluster Hub'),
# Product structures
('product_page', 'Product Page'),
# Taxonomy structures
('category_archive', 'Category Archive'),
('tag_archive', 'Tag Archive'),
('attribute_archive', 'Attribute Archive'),
]
idea_title = models.CharField(max_length=255, db_index=True)
@@ -187,17 +201,17 @@ class ContentIdeas(SiteSectorBaseModel):
)
status = models.CharField(max_length=50, choices=STATUS_CHOICES, default='new')
estimated_word_count = models.IntegerField(default=1000)
site_entity_type = models.CharField(
content_type = models.CharField(
max_length=50,
choices=SITE_ENTITY_TYPE_CHOICES,
default='page',
help_text="Target entity type when promoting idea into tasks/pages"
choices=CONTENT_TYPE_CHOICES,
default='post',
help_text="Content type: post, page, product, taxonomy"
)
cluster_role = models.CharField(
content_structure = models.CharField(
max_length=50,
choices=CLUSTER_ROLE_CHOICES,
default='hub',
help_text="Role within the cluster-driven sitemap"
choices=CONTENT_STRUCTURE_CHOICES,
default='article',
help_text="Content structure/format based on content type"
)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
@@ -212,8 +226,8 @@ class ContentIdeas(SiteSectorBaseModel):
models.Index(fields=['idea_title']),
models.Index(fields=['status']),
models.Index(fields=['keyword_cluster']),
models.Index(fields=['site_entity_type']),
models.Index(fields=['cluster_role']),
models.Index(fields=['content_type']),
models.Index(fields=['content_structure']),
models.Index(fields=['site', 'sector']),
]