# Generated by Django 5.2 on 2025-04-07 03:52

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AiInteraction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('actor', models.CharField(max_length=100)),
                ('user_email', models.EmailField(blank=True, max_length=254, null=True)),
                ('user_first_name', models.CharField(blank=True, max_length=100, null=True)),
                ('user_last_name', models.CharField(blank=True, max_length=100, null=True)),
                ('module_name', models.TextField()),
                ('callable_name', models.TextField()),
                ('was_successful', models.BooleanField(default=True)),
                ('exception', models.TextField(blank=True, null=True)),
                ('stack_trace', models.TextField(blank=True, null=True)),
                ('created_datetime', models.DateTimeField(default=django.utils.timezone.now)),
                ('interaction', models.JSONField(blank=True, null=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'spire_ai_interaction',
            }
        ),
    ]
