# Generated migration for IntegrationSettings and AIPrompt models

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('igny8_core_auth', '0001_initial'),
        ('system', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AIPrompt',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prompt_type', models.CharField(choices=[('clustering', 'Clustering'), ('ideas', 'Ideas Generation'), ('content_generation', 'Content Generation'), ('image_prompt_template', 'Image Prompt Template'), ('negative_prompt', 'Negative Prompt')], db_index=True, max_length=50)),
                ('prompt_value', models.TextField(help_text='The prompt template text')),
                ('default_prompt', models.TextField(help_text='Default prompt value (for reset)')),
                ('is_active', models.BooleanField(default=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('tenant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.tenant')),
            ],
            options={
                'db_table': 'igny8_ai_prompts',
                'ordering': ['prompt_type'],
                'unique_together': {('tenant', 'prompt_type')},
                'indexes': [
                    models.Index(fields=['prompt_type'], name='igny8_ai_pr_prompt__idx'),
                    models.Index(fields=['tenant', 'prompt_type'], name='igny8_ai_pr_tenant__idx'),
                ],
            },
        ),
        migrations.CreateModel(
            name='IntegrationSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('integration_type', models.CharField(choices=[('openai', 'OpenAI'), ('runware', 'Runware'), ('gsc', 'Google Search Console')], db_index=True, max_length=50)),
                ('config', models.JSONField(default=dict, help_text='Integration configuration (API keys, settings, etc.)')),
                ('is_active', models.BooleanField(default=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('tenant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.tenant')),
            ],
            options={
                'db_table': 'igny8_integration_settings',
                'ordering': ['integration_type'],
                'unique_together': {('tenant', 'integration_type')},
                'indexes': [
                    models.Index(fields=['integration_type'], name='igny8_integ_integra_idx'),
                    models.Index(fields=['tenant', 'integration_type'], name='igny8_integ_tenant__idx'),
                ],
            },
        ),
    ]

