mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 18:12:56 +00:00
New features: - Job Posting Generator (4.00 AED): Creates professional job postings with detailed requirements, company culture integration, and SEO optimization - Social Ads Generator (7.00 AED): Creates compelling social media advertisements with platform-optimized copy and emoji support Technical improvements: - Individual agent architecture with namespaced templates - Real-time AJAX form submission without page reload - Wallet deduction only after successful processing - Platform-specific optimization (job posting: 6 platforms, social ads: 6 platforms) - Copy/download functionality for generated content - Comprehensive form validation and error handling Database changes: - Job posting specific fields: job_title, company_name, seniority_level, contract_type, location, language - Social ads specific fields: description, social_platform, include_emoji, language - Response models with structured content fields 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
66 lines
2.2 KiB
Python
66 lines
2.2 KiB
Python
from django.db import models
|
|
from decimal import Decimal
|
|
from agent_base.models import BaseAgentRequest, BaseAgentResponse
|
|
|
|
|
|
class SocialAdsGeneratorRequest(BaseAgentRequest):
|
|
"""Social Ads Generator request tracking"""
|
|
|
|
# Required fields
|
|
description = models.TextField(help_text="Product/service description")
|
|
social_platform = models.CharField(
|
|
max_length=20,
|
|
choices=[
|
|
('facebook', 'Facebook'),
|
|
('instagram', 'Instagram'),
|
|
('twitter', 'Twitter'),
|
|
('linkedin', 'LinkedIn'),
|
|
('tiktok', 'TikTok'),
|
|
('youtube', 'YouTube'),
|
|
],
|
|
default='facebook'
|
|
)
|
|
|
|
# Optional fields
|
|
include_emoji = models.BooleanField(default=False, help_text="Include emojis in ad copy")
|
|
language = models.CharField(
|
|
max_length=20,
|
|
choices=[
|
|
('English', 'English'),
|
|
('Arabic', 'Arabic (العربية)'),
|
|
('Spanish', 'Spanish (Español)'),
|
|
('French', 'French (Français)'),
|
|
('German', 'German (Deutsch)'),
|
|
('Chinese', 'Chinese (中文)'),
|
|
],
|
|
default='English'
|
|
)
|
|
|
|
|
|
class Meta:
|
|
db_table = 'social_ads_generator_requests'
|
|
verbose_name = 'Social Ads Generator Request'
|
|
verbose_name_plural = 'Social Ads Generator Requests'
|
|
|
|
|
|
class SocialAdsGeneratorResponse(BaseAgentResponse):
|
|
"""Social Ads Generator response storage"""
|
|
|
|
request = models.OneToOneField(
|
|
SocialAdsGeneratorRequest,
|
|
on_delete=models.CASCADE,
|
|
related_name='response'
|
|
)
|
|
|
|
# Agent-specific response fields
|
|
ad_copy = models.TextField(blank=True, help_text="Generated ad copy")
|
|
hashtags = models.TextField(blank=True, help_text="Suggested hashtags")
|
|
targeting_suggestions = models.TextField(blank=True, help_text="Audience targeting suggestions")
|
|
formatted_ad = models.TextField(blank=True, help_text="Formatted ad content")
|
|
raw_response = models.JSONField(default=dict, blank=True)
|
|
|
|
|
|
class Meta:
|
|
db_table = 'social_ads_generator_responses'
|
|
verbose_name = 'Social Ads Generator Response'
|
|
verbose_name_plural = 'Social Ads Generator Responses' |