# Generated by Django 6.0.6 on 2026-07-13 05:08

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


class Migration(migrations.Migration):

    dependencies = [
        ('ai_calls', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CallEvaluation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('technical_score', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('communication_score', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('experience_score', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('confidence_score', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('overall_score', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('classification', models.CharField(blank=True, choices=[('Strong Match', 'Strong Match'), ('Potential Match', 'Potential Match'), ('Not Suitable', 'Not Suitable')], default='', max_length=20)),
                ('recommendation', models.CharField(blank=True, choices=[('Proceed', 'Proceed'), ('Hold', 'Hold'), ('Reject', 'Reject')], default='', max_length=10)),
                ('strengths', models.JSONField(blank=True, default=list)),
                ('weaknesses', models.JSONField(blank=True, default=list)),
                ('summary', models.TextField(blank=True, default='')),
                ('rubric', models.JSONField(blank=True, default=dict, help_text='Per-question scores + evidence quotes.')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('call', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='evaluation', to='ai_calls.aicall')),
            ],
            options={
                'db_table': 'ai_call_evaluations',
            },
        ),
        migrations.CreateModel(
            name='CallTranscriptUtterance',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sequence', models.PositiveIntegerField()),
                ('speaker', models.CharField(choices=[('AGENT', 'AI Agent'), ('CANDIDATE', 'Candidate')], max_length=10)),
                ('message', models.TextField()),
                ('started_ms', models.PositiveIntegerField(blank=True, help_text='Offset into the call, ms.', null=True)),
                ('ended_ms', models.PositiveIntegerField(blank=True, null=True)),
                ('language', models.CharField(default='en', max_length=5)),
                ('interrupted', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('call', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='utterances', to='ai_calls.aicall')),
            ],
            options={
                'db_table': 'ai_call_utterances',
                'ordering': ['sequence', 'id'],
                'unique_together': {('call', 'sequence')},
            },
        ),
    ]
