# Generated by Django 5.2.8 on 2025-11-07 11:34

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


class Migration(migrations.Migration):

    dependencies = [
        ('igny8_core_auth', '0010_add_seed_keyword'),
        ('system', '0004_aisettings_modulesettings_systemsettings_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='AuthorProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text="Profile name (e.g., 'SaaS B2B Informative')", max_length=255)),
                ('description', models.TextField(blank=True, help_text='Description of the writing style')),
                ('tone', models.CharField(help_text="Writing tone (e.g., 'Professional', 'Casual', 'Technical', 'Conversational')", max_length=100)),
                ('language', models.CharField(default='en', help_text="Language code (e.g., 'en', 'es', 'fr')", max_length=50)),
                ('structure_template', models.JSONField(default=dict, help_text='Structure template defining content sections and their order')),
                ('is_active', models.BooleanField(db_index=True, 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={
                'verbose_name': 'Author Profile',
                'verbose_name_plural': 'Author Profiles',
                'db_table': 'igny8_author_profiles',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Strategy',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Strategy name', max_length=255)),
                ('description', models.TextField(blank=True, help_text='Description of the content strategy')),
                ('prompt_types', models.JSONField(default=list, help_text="List of prompt types to use (e.g., ['clustering', 'ideas', 'content_generation'])")),
                ('section_logic', models.JSONField(default=dict, help_text='Section logic configuration defining content structure and flow')),
                ('is_active', models.BooleanField(db_index=True, default=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('sector', models.ForeignKey(blank=True, help_text='Optional: Link strategy to a specific sector', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='strategies', to='igny8_core_auth.sector')),
                ('tenant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_set', to='igny8_core_auth.tenant')),
            ],
            options={
                'verbose_name': 'Strategy',
                'verbose_name_plural': 'Strategies',
                'db_table': 'igny8_strategies',
                'ordering': ['name'],
            },
        ),
        migrations.AddIndex(
            model_name='authorprofile',
            index=models.Index(fields=['tenant', 'is_active'], name='igny8_autho_tenant__97d2c2_idx'),
        ),
        migrations.AddIndex(
            model_name='authorprofile',
            index=models.Index(fields=['name'], name='igny8_autho_name_8295f3_idx'),
        ),
        migrations.AddIndex(
            model_name='strategy',
            index=models.Index(fields=['tenant', 'is_active'], name='igny8_strat_tenant__344de9_idx'),
        ),
        migrations.AddIndex(
            model_name='strategy',
            index=models.Index(fields=['tenant', 'sector'], name='igny8_strat_tenant__279cfa_idx'),
        ),
        migrations.AddIndex(
            model_name='strategy',
            index=models.Index(fields=['name'], name='igny8_strat_name_8fe823_idx'),
        ),
    ]
