# Generated by Django 6.0.1 on 2026-01-15 12:02

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='SocialMediaComment',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('platform', models.CharField(choices=[('facebook', 'Facebook'), ('instagram', 'Instagram'), ('youtube', 'YouTube'), ('twitter', 'Twitter/X'), ('linkedin', 'LinkedIn'), ('tiktok', 'TikTok'), ('google', 'Google Reviews')], db_index=True, help_text='Social media platform', max_length=50)),
                ('comment_id', models.CharField(db_index=True, help_text='Unique comment ID from the platform', max_length=255)),
                ('comments', models.TextField(help_text='Comment text content')),
                ('author', models.CharField(blank=True, help_text='Comment author', max_length=255, null=True)),
                ('raw_data', models.JSONField(default=dict, help_text='Complete raw data from platform API')),
                ('post_id', models.CharField(blank=True, help_text='ID of the post/media', max_length=255, null=True)),
                ('media_url', models.URLField(blank=True, help_text='URL to associated media', max_length=500, null=True)),
                ('like_count', models.IntegerField(default=0, help_text='Number of likes')),
                ('reply_count', models.IntegerField(default=0, help_text='Number of replies')),
                ('rating', models.IntegerField(blank=True, db_index=True, help_text='Star rating (1-5) for review platforms like Google Reviews', null=True)),
                ('published_at', models.DateTimeField(blank=True, db_index=True, help_text='When the comment was published', null=True)),
                ('scraped_at', models.DateTimeField(auto_now_add=True, db_index=True, help_text='When the comment was scraped')),
                ('ai_analysis', models.JSONField(blank=True, db_index=True, default=dict, help_text='Complete AI analysis in bilingual format (en/ar) with sentiment, summaries, keywords, topics, entities, and emotions')),
            ],
            options={
                'ordering': ['-published_at'],
                'indexes': [models.Index(fields=['platform'], name='social_soci_platfor_307afd_idx'), models.Index(fields=['published_at'], name='social_soci_publish_5f2b85_idx'), models.Index(fields=['platform', '-published_at'], name='social_soci_platfor_4f0230_idx'), models.Index(fields=['ai_analysis'], name='idx_ai_analysis')],
                'unique_together': {('platform', 'comment_id')},
            },
        ),
    ]
