# Generated by Django 4.2.4 on 2025-05-23 08:36

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ai', '0003_prompttemplate_last_validated_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='AIProviderConfig',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('divination_type', models.CharField(choices=[('bazi', 'BaZi'), ('number', 'Number Power'), ('liuyao', 'LiuYao')], help_text='The type of divination this configuration applies to', max_length=10, unique=True, verbose_name='Divination Type')),
                ('provider', models.CharField(choices=[('groq', 'Groq'), ('openai', 'OpenAI')], help_text='The AI provider to use for this divination type', max_length=10, verbose_name='AI Provider')),
                ('model', models.CharField(help_text='The specific model to use with the selected provider', max_length=100, verbose_name='Model')),
                ('is_active', models.BooleanField(default=True, help_text='Whether this configuration is currently active', verbose_name='Is Active')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_ai_configs', to=settings.AUTH_USER_MODEL, verbose_name='Created By')),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='modified_ai_configs', to=settings.AUTH_USER_MODEL, verbose_name='Last Modified By')),
            ],
            options={
                'verbose_name': 'AI Provider Configuration',
                'verbose_name_plural': 'AI Provider Configurations',
                'ordering': ['divination_type'],
            },
        ),
    ]
