# Generated by Django 4.2.7 on 2026-01-29 09:25

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),
        ('influencers', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='influencerprofile',
            name='biography',
            field=models.TextField(blank=True, help_text='Instagram biography/bio text', null=True),
        ),
        migrations.AddField(
            model_name='influencerprofile',
            name='following_count',
            field=models.IntegerField(default=0, help_text='Total number of accounts this user is following'),
        ),
        migrations.AddField(
            model_name='influencerprofile',
            name='full_name',
            field=models.CharField(blank=True, help_text='Full name from Instagram profile', max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='influencerprofile',
            name='niche_probabilities',
            field=models.JSONField(blank=True, default=dict, help_text="Probability distribution across all niche classes (e.g., {'fashion': 0.8, 'fitness': 0.1, ...})"),
        ),
        migrations.AddField(
            model_name='influencerprofile',
            name='popularity_probabilities',
            field=models.JSONField(blank=True, default=dict, help_text="Probability distribution across popularity tiers (e.g., {'micro': 0.7, 'mid': 0.2, ...})"),
        ),
        migrations.AddField(
            model_name='influencerprofile',
            name='processed_data_snapshot',
            field=models.JSONField(blank=True, default=dict, help_text='Snapshot of processed data fed to ML model for transparency and debugging'),
        ),
        migrations.AlterField(
            model_name='influencerprofile',
            name='ai_generated_niche',
            field=models.CharField(blank=True, db_index=True, help_text="AI-predicted niche (e.g., 'fashion', 'fitness', 'food') - Top prediction", max_length=100, null=True),
        ),
        migrations.CreateModel(
            name='BusinessSearch',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('business_description', models.TextField(help_text='Free text describing business needs, target audience, campaign goals')),
                ('budget_min', models.DecimalField(decimal_places=2, help_text='Minimum budget for influencer collaboration', max_digits=10)),
                ('budget_max', models.DecimalField(decimal_places=2, help_text='Maximum budget for influencer collaboration', max_digits=10)),
                ('predicted_niche_probabilities', models.JSONField(default=dict, help_text='Predicted niche probabilities from business description')),
                ('predicted_popularity_probabilities', models.JSONField(default=dict, help_text='Predicted popularity tier from budget range')),
                ('matched_influencers', models.JSONField(default=list, help_text='List of matched influencer IDs with similarity scores')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('business_user', models.ForeignKey(help_text='Business user who performed the search', on_delete=django.db.models.deletion.CASCADE, related_name='business_searches', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Business Search',
                'verbose_name_plural': 'Business Searches',
                'ordering': ['-created_at'],
            },
        ),
    ]
