New Model & tokens/credits updates

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-23 06:26:15 +00:00
parent 1d4825ad77
commit d768ed71d4
9 changed files with 945 additions and 35 deletions

View File

@@ -60,6 +60,25 @@ class IntegrationSettings(AccountBaseModel):
integration_type = models.CharField(max_length=50, choices=INTEGRATION_TYPE_CHOICES, db_index=True)
config = models.JSONField(default=dict, help_text="Integration configuration (API keys, settings, etc.)")
is_active = models.BooleanField(default=True)
# AI Model Selection (NEW)
default_text_model = models.ForeignKey(
'billing.AIModelConfig',
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name='text_integrations',
help_text="Default AI model for text generation operations"
)
default_image_model = models.ForeignKey(
'billing.AIModelConfig',
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name='image_integrations',
help_text="Default AI model for image generation operations"
)
updated_at = models.DateTimeField(auto_now=True)
created_at = models.DateTimeField(auto_now_add=True)