# Generated by Django 5.2.8 on 2025-11-20 23:27

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AITaskLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('task_id', models.CharField(blank=True, db_index=True, max_length=255, null=True)),
                ('function_name', models.CharField(db_index=True, max_length=100)),
                ('phase', models.CharField(default='INIT', max_length=50)),
                ('message', models.TextField(blank=True)),
                ('status', models.CharField(choices=[('success', 'Success'), ('error', 'Error'), ('pending', 'Pending')], default='pending', max_length=20)),
                ('duration', models.IntegerField(blank=True, help_text='Duration in milliseconds', null=True)),
                ('cost', models.DecimalField(decimal_places=6, default=0.0, max_digits=10)),
                ('tokens', models.IntegerField(default=0)),
                ('request_steps', models.JSONField(blank=True, default=list)),
                ('response_steps', models.JSONField(blank=True, default=list)),
                ('error', models.TextField(blank=True, null=True)),
                ('payload', models.JSONField(blank=True, null=True)),
                ('result', models.JSONField(blank=True, null=True)),
            ],
            options={
                'db_table': 'igny8_ai_task_logs',
                'ordering': ['-created_at'],
            },
        ),
    ]
