# Generated by Django 5.2 on 2025-11-20 21:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0199_merge_20251120_1338'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='EvalSuiteRun',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('suite_slug', models.CharField(max_length=200)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('running', 'Running'), ('completed', 'Completed'), ('errored', 'Errored')], default='pending', max_length=20)),
                ('agent_strategy', models.CharField(choices=[('ephemeral_per_scenario', 'Ephemeral per scenario'), ('reuse_agent', 'Reuse provided agent')], default='ephemeral_per_scenario', max_length=40)),
                ('started_at', models.DateTimeField(blank=True, null=True)),
                ('finished_at', models.DateTimeField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('initiated_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('shared_agent', models.ForeignKey(blank=True, help_text='Agent reused across all scenarios if agent_strategy is reuse_agent.', null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.persistentagent')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddField(
            model_name='evalrun',
            name='suite_run',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='runs', to='api.evalsuiterun'),
        ),
    ]
